-
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.
* Refactor image pipeline module names and update workflows * Refactor image pipeline module names and update workflows * adding a workspace for managing service accounts * Autoformatting TF Code * fixing module source * adding service-accounts for use with github actions * Refactor image pipeline module names and update workflows * chore: Update module name in sandbox.tf * chore: Update module source in sandbox.tf * Update terraform_plan.yaml * Update terraform_plan.yaml * Update terraform_plan.yaml * Update sandbox.tf --------- Co-authored-by: Dave Arnold <dave@roknsound.com>
- Loading branch information
Showing
4 changed files
with
85 additions
and
3 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
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,14 @@ | ||
| locals { | ||
| secrets = [ | ||
| "AWS_SECRET_ACCESS_KEY", | ||
| "AWS_SESSION_TOKEN", | ||
| "AWS_ACCESS_KEY_ID", | ||
| "GITHUB_TOKEN" | ||
| ] | ||
| } | ||
|
|
||
| module "env_var" { | ||
| source = "HappyPathway/var/env" | ||
| for_each = toset(local.secrets) | ||
| env_var = each.value | ||
| } |
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
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,61 @@ | ||
|
|
||
| locals { | ||
| workspace_instances = [ | ||
| "arnol377-sandbox" | ||
| ] | ||
| } | ||
|
|
||
| module "sandbox" { | ||
| source = "HappyPathway/repo/github" | ||
| for_each = toset(local.workspace_instances) | ||
| github_repo_description = "Sandbox - ${each.value}" | ||
| repo_org = "arnol377" | ||
| name = each.value | ||
| github_repo_topics = [ | ||
| "terraform" | ||
| ] | ||
| force_name = true | ||
| github_is_private = false | ||
| create_codeowners = false | ||
| enforce_prs = false | ||
| collaborators = {"arnol377": "admin"} | ||
| managed_extra_files = [ | ||
| { | ||
| path = ".github/workflows/terraform-plan.yaml" | ||
| content = templatefile( | ||
| "${path.module}/workflows/terraform-plan.yaml.tpl", | ||
| { | ||
| repo_name = each.value, | ||
| directory = null | ||
| git_owner = { | ||
| name = "arnol377" | ||
| email = "david.j.arnold.jr@census.gov" | ||
| } | ||
| } | ||
| ) | ||
| }, | ||
| { | ||
| path = ".github/workflows/terraform-apply.yaml" | ||
| content = templatefile( | ||
| "${path.module}/workflows/terraform-apply.yaml.tpl", | ||
| { | ||
| repo_name = each.value, | ||
| directory = null | ||
| } | ||
| ) | ||
| } | ||
| ] | ||
| 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 | ||
| } | ||
| ] | ||
| } |