diff --git a/main.tf b/main.tf index 2eb6a76..bb8857b 100644 --- a/main.tf +++ b/main.tf @@ -7,19 +7,19 @@ locals { } data "aws_ip_ranges" "ip_ranges" { - regions = ["us-gov-west-1", "us-gov-east-1"] + regions = ["us-gov-west-1", "us-gov-east-1"] services = ["s3", "dynamodb"] } -data dns_a_record_set github { +data "dns_a_record_set" "github" { host = "github.e.it.census.gov" } locals { proxy_vars = { - HTTP_PROXY = "http://proxy.tco.census.gov:3128" - NO_PROXY = "169.254.170.2,.census.gov,169.254.169.254,148.129.0.0/16,10.0.0.0/8,${join(",", data.dns_a_record_set.github.addrs)},172.16.0/12,.eks.amazonaws.com,.s3.amazonaws.com,.amazonaws.com,.gcr.io,.pkg.dev" - HTTPS_PROXY = "http://proxy.tco.census.gov:3128" + HTTP_PROXY = "http://proxy.tco.census.gov:3128" + NO_PROXY = "169.254.170.2,.census.gov,169.254.169.254,148.129.0.0/16,10.0.0.0/8,${join(",", data.dns_a_record_set.github.addrs)},172.16.0/12,.eks.amazonaws.com,.s3.amazonaws.com,.amazonaws.com,.gcr.io,.pkg.dev" + HTTPS_PROXY = "http://proxy.tco.census.gov:3128" } pipeline_repos = [ "aws-image-pipeline", @@ -67,7 +67,7 @@ resource "aws_vpc_endpoint" "ecr" { service_name = each.value vpc_endpoint_type = "Interface" - security_group_ids = var.security_groups + security_group_ids = var.security_groups # private_dns_enabled = true } @@ -109,12 +109,12 @@ module "github-runner" { visibility = "all" } - extra_environment_vars = local.proxy_vars + extra_environment_vars = local.proxy_vars github_runner_permissions_arn = aws_iam_policy.admin_policy.arn server_url = var.server_url runner_labels = [ - var.repo_org, + lower(var.repo_org), "${data.aws_caller_identity.current.account_id}-${data.aws_region.current.name}", data.aws_caller_identity.current.account_id, data.aws_region.current.name, diff --git a/variables.tf b/variables.tf index 7f4adb6..36ff671 100644 --- a/variables.tf +++ b/variables.tf @@ -79,7 +79,7 @@ variable "certs" { default = null } -variable create_ecs_cluster { - type = bool +variable "create_ecs_cluster" { + type = bool default = false } diff --git a/versions.tf b/versions.tf new file mode 100644 index 0000000..d17d3e9 --- /dev/null +++ b/versions.tf @@ -0,0 +1,8 @@ +terraform { + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.70.0" + } + } +}