Skip to content

Commit

Permalink
Update main.tf
Browse files Browse the repository at this point in the history
  • Loading branch information
arnol377 committed May 28, 2024
1 parent ddeda30 commit 98e1d84
Showing 1 changed file with 15 additions and 35 deletions.
50 changes: 15 additions & 35 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,30 +1,10 @@
#module "network" {
# source = "HappyPathway/network/aws"
# network_name = "csvd-infra-automation"
# region = "us-gov-west-1"
# key_name = "csvd-dev-ew-public-network"
# private_subnet_cidrs = [
# "10.0.5.0/24",
# "10.0.6.0/24"
# ]
# public_subnet_cidrs = [
# "10.0.7.0/24",
# "10.0.8.0/24"
# ]
# availability_zones = [
# "us-gov-west-1a",
# "us-gov-west-1b",
# "us-gov-west-1c"
# ]
#}

#locals {
# proxy_env_vars = {
# HTTP_PROXY = "http://proxy.tco.census.gov:3128"
# NO_PROXY = ".census.gov,169.254.169.254,148.129.*,10.*,172.18.*,172.22.*,172.23.*,172.24.*,172.25.*,.eks.amazonaws.com,.s3.amazonaws.com,.amazonaws.com,.gcr.io,.pkg.dev"
# HTTPS_PROXY = "http://proxy.tco.census.gov:3128"
# }
#}
locals {
proxy_env_vars = {
HTTP_PROXY = "http://proxy.tco.census.gov:3128"
NO_PROXY = ".census.gov,169.254.169.254,148.129.*,10.*,172.18.*,172.22.*,172.23.*,172.24.*,172.25.*,.eks.amazonaws.com,.s3.amazonaws.com,.amazonaws.com,.gcr.io,.pkg.dev"
HTTPS_PROXY = "http://proxy.tco.census.gov:3128"
}
}

data "aws_iam_policy_document" "s3_access" {
statement {
Expand Down Expand Up @@ -56,14 +36,14 @@ module "main" {
create_new_repo = true
create_new_role = true
build_permissions_iam_doc = data.aws_iam_policy_document.s3_access
#build_environment_variables = [
# for proxy_var in keys(local.proxy_env_vars) :
# {
# name=proxy_var,
# value=lookup(local.proxy_env_vars, proxy_var),
# type = "PLAINTEXT"
# }
#]
build_environment_variables = [
for proxy_var in keys(local.proxy_env_vars) :
{
name=proxy_var,
value=lookup(local.proxy_env_vars, proxy_var),
type = "PLAINTEXT"
}
]
ansible_repo = aws_codecommit_repository.ansible
vpc_config = {
vpc_id = local.vpc_id
Expand Down

0 comments on commit 98e1d84

Please sign in to comment.