From 264155e47a4e782c96157e77fcf42640d0786f6c Mon Sep 17 00:00:00 2001 From: halprin Date: Thu, 30 Nov 2023 14:47:22 -0700 Subject: [PATCH] 498: Create the prod environment in Terraform --- operations/environments/prod/main.tf | 32 +++++++++++++++++++++++++ operations/environments/prod/outputs.tf | 7 ++++++ 2 files changed, 39 insertions(+) create mode 100644 operations/environments/prod/main.tf create mode 100644 operations/environments/prod/outputs.tf diff --git a/operations/environments/prod/main.tf b/operations/environments/prod/main.tf new file mode 100644 index 000000000..88b484ad4 --- /dev/null +++ b/operations/environments/prod/main.tf @@ -0,0 +1,32 @@ +terraform { + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "3.82.0" + } + } + + # Use a remote Terraform state in Azure Storage + backend "azurerm" { + resource_group_name = "csels-rsti-prod-moderate-rg" + storage_account_name = "cdcintermediarytrfrmprod" + container_name = "terraform-state" + key = "prod.terraform.tfstate" + } +} + +# Configure the Microsoft Azure Provider +provider "azurerm" { + features { + key_vault { + purge_soft_deleted_secrets_on_destroy = false + } + } +} + +module "template" { + source = "../../template/" + + environment = "prod" + deployer_id = "f5feabe7-5d37-40ba-94f2-e5c0760b4561" //github app registration in CDC Azure Entra +} diff --git a/operations/environments/prod/outputs.tf b/operations/environments/prod/outputs.tf new file mode 100644 index 000000000..e24968bcd --- /dev/null +++ b/operations/environments/prod/outputs.tf @@ -0,0 +1,7 @@ +output "registry" { + value = module.template.registry +} + +output "publish_app" { + value = module.template.publish_app +}