mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 15:31:15 -05:00
Add basic terraform bootstrap and staging environments
This commit is contained in:
54
terraform/production/main.tf
Normal file
54
terraform/production/main.tf
Normal file
@@ -0,0 +1,54 @@
|
||||
locals {
|
||||
cf_org_name = "TKTK"
|
||||
cf_space_name = "TKTK"
|
||||
env = "production"
|
||||
app_name = "notifications-api"
|
||||
recursive_delete = false
|
||||
}
|
||||
|
||||
module "database" {
|
||||
source = "github.com/18f/terraform-cloudgov//database"
|
||||
|
||||
cf_user = var.cf_user
|
||||
cf_password = var.cf_password
|
||||
cf_org_name = local.cf_org_name
|
||||
cf_space_name = local.cf_space_name
|
||||
env = local.env
|
||||
app_name = local.app_name
|
||||
recursive_delete = local.recursive_delete
|
||||
rds_plan_name = "TKTK-production-rds-plan"
|
||||
}
|
||||
|
||||
module "redis" {
|
||||
source = "github.com/18f/terraform-cloudgov//redis"
|
||||
|
||||
cf_user = var.cf_user
|
||||
cf_password = var.cf_password
|
||||
cf_org_name = local.cf_org_name
|
||||
cf_space_name = local.cf_space_name
|
||||
env = local.env
|
||||
app_name = local.app_name
|
||||
recursive_delete = local.recursive_delete
|
||||
redis_plan_name = "TKTK-production-redis-plan"
|
||||
}
|
||||
|
||||
###########################################################################
|
||||
# The following lines need to be commented out for the initial `terraform apply`
|
||||
# It can be re-enabled after:
|
||||
# 1) the app has first been deployed
|
||||
# 2) the route has been manually created by an OrgManager:
|
||||
# `cf create-domain TKTK-org-name TKTK-production-domain-name`
|
||||
###########################################################################
|
||||
# module "domain" {
|
||||
# source = "github.com/18f/terraform-cloudgov//domain"
|
||||
#
|
||||
# cf_user = var.cf_user
|
||||
# cf_password = var.cf_password
|
||||
# cf_org_name = local.cf_org_name
|
||||
# cf_space_name = local.cf_space_name
|
||||
# env = local.env
|
||||
# app_name = local.app_name
|
||||
# recursive_delete = local.recursive_delete
|
||||
# cdn_plan_name = "domain"
|
||||
# domain_name = "TKTK-production-domain-name"
|
||||
# }
|
||||
17
terraform/production/providers.tf
Normal file
17
terraform/production/providers.tf
Normal file
@@ -0,0 +1,17 @@
|
||||
terraform {
|
||||
required_version = "~> 1.0"
|
||||
required_providers {
|
||||
cloudfoundry = {
|
||||
source = "cloudfoundry-community/cloudfoundry"
|
||||
version = "0.15.5"
|
||||
}
|
||||
}
|
||||
|
||||
backend "s3" {
|
||||
bucket = "cg-31204bcc-aae3-4cd3-8b59-5055a338d44f"
|
||||
key = "api.tfstate.prod"
|
||||
encrypt = "true"
|
||||
region = "us-gov-west-1"
|
||||
profile = "notify-terraform-backend"
|
||||
}
|
||||
}
|
||||
2
terraform/production/variables.tf
Normal file
2
terraform/production/variables.tf
Normal file
@@ -0,0 +1,2 @@
|
||||
variable "cf_password" {}
|
||||
variable "cf_user" {}
|
||||
Reference in New Issue
Block a user