mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-02 17:48:50 -04:00
Add basic terraform bootstrap and staging environments
This commit is contained in:
24
terraform/bootstrap/main.tf
Normal file
24
terraform/bootstrap/main.tf
Normal file
@@ -0,0 +1,24 @@
|
||||
locals {
|
||||
cf_api_url = "https://api.fr.cloud.gov"
|
||||
s3_service_name = "notify-terraform-state"
|
||||
}
|
||||
|
||||
module "s3" {
|
||||
source = "github.com/18f/terraform-cloudgov//s3"
|
||||
|
||||
cf_api_url = local.cf_api_url
|
||||
cf_user = var.cf_user
|
||||
cf_password = var.cf_password
|
||||
cf_org_name = "gsa-10x-prototyping"
|
||||
cf_space_name = "10x-notifications"
|
||||
s3_service_name = local.s3_service_name
|
||||
}
|
||||
|
||||
resource "cloudfoundry_service_key" "bucket_creds" {
|
||||
name = "${local.s3_service_name}-access"
|
||||
service_instance = module.s3.bucket_id
|
||||
}
|
||||
|
||||
output "bucket_credentials" {
|
||||
value = cloudfoundry_service_key.bucket_creds.credentials
|
||||
}
|
||||
Reference in New Issue
Block a user