Update terraform for new org and space names

This commit is contained in:
Ryan Ahearn
2022-11-01 12:22:20 -04:00
parent 5d4dca3ecf
commit 90b5261821
10 changed files with 43 additions and 15 deletions

View File

@@ -9,8 +9,8 @@ module "s3" {
cf_api_url = local.cf_api_url cf_api_url = local.cf_api_url
cf_user = var.cf_user cf_user = var.cf_user
cf_password = var.cf_password cf_password = var.cf_password
cf_org_name = "gsa-10x-prototyping" cf_org_name = "gsa-tts-benefits-studio-prototyping"
cf_space_name = "10x-notifications" cf_space_name = "notify-management"
s3_service_name = local.s3_service_name s3_service_name = local.s3_service_name
} }

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
if [[ ! -f "secrets.auto.tfvars" ]]; then if [[ ! -f "secrets.auto.tfvars" ]]; then
../create_service_account.sh -s 10x-notifications -u config-bootstrap-deployer > secrets.auto.tfvars ../create_service_account.sh -s notify-management -u config-bootstrap-deployer > secrets.auto.tfvars
fi fi
if [[ $# -gt 0 ]]; then if [[ $# -gt 0 ]]; then

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
../destroy_service_account.sh -s 10x-notifications -u config-bootstrap-deployer ../destroy_service_account.sh -s notify-management -u config-bootstrap-deployer
rm secrets.auto.tfvars rm secrets.auto.tfvars

View File

@@ -1,2 +1,4 @@
variable "cf_password" {} variable "cf_password" {
sensitive = true
}
variable "cf_user" {} variable "cf_user" {}

View File

@@ -1,6 +1,6 @@
locals { locals {
cf_org_name = "TKTK" cf_org_name = "gsa-tts-benefits-studio-prototyping"
cf_space_name = "TKTK" cf_space_name = "notify-demo"
env = "production" env = "production"
app_name = "notifications-api" app_name = "notifications-api"
recursive_delete = false recursive_delete = false
@@ -16,7 +16,7 @@ module "database" {
env = local.env env = local.env
app_name = local.app_name app_name = local.app_name
recursive_delete = local.recursive_delete recursive_delete = local.recursive_delete
rds_plan_name = "TKTK-production-rds-plan" rds_plan_name = "micro-psql"
} }
module "redis" { module "redis" {
@@ -29,7 +29,29 @@ module "redis" {
env = local.env env = local.env
app_name = local.app_name app_name = local.app_name
recursive_delete = local.recursive_delete recursive_delete = local.recursive_delete
redis_plan_name = "TKTK-production-redis-plan" redis_plan_name = "redis-dev"
}
module "csv_upload_bucket" {
source = "github.com/18f/terraform-cloudgov//s3"
cf_user = var.cf_user
cf_password = var.cf_password
cf_org_name = local.cf_org_name
cf_space_name = local.cf_space_name
recursive_delete = local.recursive_delete
s3_service_name = "${local.app_name}-csv-upload-bucket-${local.env}"
}
module "contact_list_bucket" {
source = "github.com/18f/terraform-cloudgov//s3"
cf_user = var.cf_user
cf_password = var.cf_password
cf_org_name = local.cf_org_name
cf_space_name = local.cf_space_name
recursive_delete = local.recursive_delete
s3_service_name = "${local.app_name}-contact-list-bucket-${local.env}"
} }
########################################################################### ###########################################################################

View File

@@ -8,7 +8,7 @@ terraform {
} }
backend "s3" { backend "s3" {
bucket = "cg-31204bcc-aae3-4cd3-8b59-5055a338d44f" bucket = "TKTK"
key = "api.tfstate.prod" key = "api.tfstate.prod"
encrypt = "true" encrypt = "true"
region = "us-gov-west-1" region = "us-gov-west-1"

View File

@@ -1,2 +1,4 @@
variable "cf_password" {} variable "cf_password" {
sensitive = true
}
variable "cf_user" {} variable "cf_user" {}

View File

@@ -1,6 +1,6 @@
locals { locals {
cf_org_name = "gsa-10x-prototyping" cf_org_name = "gsa-tts-benefits-studio-prototyping"
cf_space_name = "10x-notifications" cf_space_name = "notify-staging"
env = "staging" env = "staging"
app_name = "notifications-api" app_name = "notifications-api"
recursive_delete = true recursive_delete = true

View File

@@ -8,7 +8,7 @@ terraform {
} }
backend "s3" { backend "s3" {
bucket = "cg-31204bcc-aae3-4cd3-8b59-5055a338d44f" bucket = "TKTK"
key = "api.tfstate.stage" key = "api.tfstate.stage"
encrypt = "true" encrypt = "true"
region = "us-gov-west-1" region = "us-gov-west-1"

View File

@@ -1,2 +1,4 @@
variable "cf_password" {} variable "cf_password" {
sensitive = true
}
variable "cf_user" {} variable "cf_user" {}