-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
arnol377
committed
Aug 14, 2024
1 parent
2eea940
commit c44b94c
Showing
4 changed files
with
3,322 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| module github_script { | ||
| source = "HappyPathway/gh-actions/importer" | ||
| git_repo_url = "https://github.com/actions/github-script.git" | ||
| git_repo_path = "/home/a/arnol377/git/gh-actions-github-script" | ||
| repo_name = "gh-actions-github-script" | ||
| repo_org = "CSVD" | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,80 @@ | ||
| module "runner" { | ||
| source = "HappyPathway/runner/ghe" | ||
| github_base_url = "https://github.e.it.census.gov" | ||
| github_owner = "CSVD" | ||
| runner_basedir = "/apps/terraform/workspaces/arnol377/ghe-runner" | ||
| runner_tarball = "/apps/terraform/workspaces/arnol377/actions-runner-linux-x64-2.304.0.tar.gz" | ||
| repos = [ | ||
|
|
||
| locals { | ||
| pipeline_repos = [ | ||
| "aws-image-pipeline", | ||
| "linux-image-pipeline", | ||
| "windows-image-pipeline", | ||
| "image-pipeline-goss-testing", | ||
| "image-pipeline-ansible-playbooks", | ||
| ] | ||
| workspace_repos = [ | ||
| "automation-repos" | ||
| ] | ||
| all_repos = concat( | ||
| local.pipeline_repos, | ||
| local.workspace_repos | ||
| ) | ||
| secrets = [ | ||
| "AWS_SECRET_ACCESS_KEY", | ||
| "AWS_SESSION_TOKEN", | ||
| "AWS_ACCESS_KEY_ID", | ||
| "GITHUB_TOKEN" | ||
| ] | ||
| } | ||
|
|
||
| module "runner" { | ||
| source = "HappyPathway/runner/ghe" | ||
| github_base_url = "https://github.e.it.census.gov" | ||
| github_owner = "CSVD" | ||
| runner_basedir = "/apps/terraform/workspaces/arnol377/ghe-runner" | ||
| runner_tarball = "/apps/terraform/workspaces/arnol377/actions-runner-linux-x64-2.304.0.tar.gz" | ||
| repos = local.pipeline_repos | ||
| runner_labels = [ | ||
| "image-pipeline" | ||
| ] | ||
| } | ||
|
|
||
| module "tf_workspace_runners" { | ||
| source = "HappyPathway/runner/ghe" | ||
| github_base_url = "https://github.e.it.census.gov" | ||
| github_owner = "CSVD" | ||
| runner_basedir = "/apps/terraform/workspaces/arnol377/ghe-runner" | ||
| runner_tarball = "/apps/terraform/workspaces/arnol377/actions-runner-linux-x64-2.304.0.tar.gz" | ||
| repos = local.workspace_repos | ||
| runner_labels = [ | ||
| "terraform-workspaces" | ||
| ] | ||
| } | ||
|
|
||
| module env_var { | ||
| source = "HappyPathway/var/env" | ||
| for_each = toset(local.secrets) | ||
| env_var = each.value | ||
| } | ||
|
|
||
| module repo_secrets { | ||
| source = "HappyPathway/vars/repo" | ||
| for_each = toset(local.all_repos) | ||
| repo = { | ||
| name = each.value | ||
| } | ||
| secrets = [ | ||
| for secret in [for secret in local.secrets : secret if secret != "AWS_ACCESS_KEY_ID"]: | ||
| { | ||
| name = replace(secret, "GITHUB", "GH") | ||
| value = lookup(module.env_var, secret).value | ||
| } | ||
| ] | ||
| vars = [ | ||
| { | ||
| name = "AWS_ACCESS_KEY_ID" | ||
| value = lookup(module.env_var, "AWS_ACCESS_KEY_ID").value | ||
| } | ||
| ] | ||
|
|
||
| } | ||
|
|
||
|
|
||
| output secrets { | ||
| value = module.env_var | ||
| } |
Oops, something went wrong.