Skip to content

Commit

Permalink
Autoformatting TF Code
Browse files Browse the repository at this point in the history
  • Loading branch information
arnol377 committed Aug 16, 2024
1 parent 8423c73 commit 8b593e1
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 42 deletions.
36 changes: 18 additions & 18 deletions external_actions.tf
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
module github_script {
source = "HappyPathway/gh-actions/importer"
version = "0.0.15"
git_repo_url = "https://github.com/actions/github-script.git"
module "github_script" {
source = "HappyPathway/gh-actions/importer"
version = "0.0.15"
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"
repo_name = "gh-actions-github-script"
repo_org = "CSVD"
}

module github_checkout {
source = "HappyPathway/gh-actions/importer"
version = "0.0.15"
git_repo_url = "https://github.com/actions/checkout.git"
module "github_checkout" {
source = "HappyPathway/gh-actions/importer"
version = "0.0.15"
git_repo_url = "https://github.com/actions/checkout.git"
git_repo_path = "/home/a/arnol377/git/gh-actions-checkout"
repo_name = "gh-actions-checkout"
repo_org = "CSVD"
repo_name = "gh-actions-checkout"
repo_org = "CSVD"
}

module setup_python {
source = "HappyPathway/gh-actions/importer"
version = "0.0.15"
git_repo_url = "https://github.com/actions/setup-python.git"
module "setup_python" {
source = "HappyPathway/gh-actions/importer"
version = "0.0.15"
git_repo_url = "https://github.com/actions/setup-python.git"
git_repo_path = "/home/a/arnol377/git/gh-actions-setup-python"
repo_name = "gh-actions-setup-python"
repo_org = "CSVD"
repo_name = "gh-actions-setup-python"
repo_org = "CSVD"
}
48 changes: 24 additions & 24 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@

locals {
pipeline_repos = [
pipeline_repos = [
"aws-image-pipeline",
"linux-image-pipeline",
"windows-image-pipeline",
"image-pipeline-goss-testing",
"image-pipeline-ansible-playbooks",
]
workspace_repos = [
workspace_repos = [
"automation-repos",
"ghe-runners"
]
Expand All @@ -16,65 +16,65 @@ locals {
local.workspace_repos
)
secrets = [
"AWS_SECRET_ACCESS_KEY",
"AWS_SESSION_TOKEN",
"AWS_ACCESS_KEY_ID",
"GITHUB_TOKEN"
"AWS_SECRET_ACCESS_KEY",
"AWS_SESSION_TOKEN",
"AWS_ACCESS_KEY_ID",
"GITHUB_TOKEN"
]
}

module "runner" {
source = "HappyPathway/runner/ghe"
source = "HappyPathway/runner/ghe"
github_base_url = "https://github.e.it.census.gov"
github_owner = "CSVD"
runner_basedir = "/apps/terraform/workspaces/arnol377/git/ghe-runner"
runner_tarball = "/apps/terraform/workspaces/arnol377/actions-runner-linux-x64-2.304.0.tar.gz"
repos = local.pipeline_repos
repos = local.pipeline_repos
runner_labels = [
"image-pipeline"
]
}

module "tf_workspace_runners" {
source = "HappyPathway/runner/ghe"
source = "HappyPathway/runner/ghe"
github_base_url = "https://github.e.it.census.gov"
github_owner = "CSVD"
runner_basedir = "/apps/terraform/workspaces/arnol377/git/ghe-runner"
runner_tarball = "/apps/terraform/workspaces/arnol377/actions-runner-linux-x64-2.304.0.tar.gz"
repos = local.workspace_repos
repos = local.workspace_repos
runner_labels = [
"terraform-workspaces"
]
}

module env_var {
source = "HappyPathway/var/env"
module "env_var" {
source = "HappyPathway/var/env"
for_each = toset(local.secrets)
env_var = each.value
env_var = each.value
}

module repo_secrets {
source = "HappyPathway/vars/repo"
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
}
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
name = "AWS_ACCESS_KEY_ID"
value = lookup(module.env_var, "AWS_ACCESS_KEY_ID").value
}
]

}

output secrets {
output "secrets" {
value = module.env_var
}

0 comments on commit 8b593e1

Please sign in to comment.