diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 71d6b0401..b533eba28 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -21,21 +21,21 @@ jobs: with: TERRAFORM_DIRECTORY: operations/environments/staging secrets: - AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} - AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} - AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} + AZURE_CLIENT_ID: ${{ secrets.AZURE_CDC_CLIENT_ID }} + AZURE_TENANT_ID: ${{ secrets.AZURE_CDC_TENANT_ID }} + AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_CDC_DMZ_C1_SUBSCRIPTION_ID }} staging-deploy: name: Staging Application Deploy needs: terraform-deploy uses: ./.github/workflows/deploy_reusable.yml with: - ENVIRONMENT: staging + ENVIRONMENT: stg REPO: trusted-intermediary-router REPO_DOCS: trusted-intermediary-docs APP: ${{ needs.terraform-deploy.outputs.APP }} REGISTRY: ${{ needs.terraform-deploy.outputs.REGISTRY }} secrets: - AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} - AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} - AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} + AZURE_CLIENT_ID: ${{ secrets.AZURE_CDC_CLIENT_ID }} + AZURE_TENANT_ID: ${{ secrets.AZURE_CDC_TENANT_ID }} + AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_CDC_DMZ_C1_SUBSCRIPTION_ID }} diff --git a/.github/workflows/deploy_reusable.yml b/.github/workflows/deploy_reusable.yml index 875d7286c..876a53b40 100644 --- a/.github/workflows/deploy_reusable.yml +++ b/.github/workflows/deploy_reusable.yml @@ -147,4 +147,4 @@ jobs: MODIFIED_ENVIRONMENT=${{ inputs.ENVIRONMENT }} fi - az storage blob sync --account-name cdcti${MODIFIED_ENVIRONMENT}docs2 -c '$web' -s ${{ steps.extract.outputs.destination }} + az storage blob sync --account-name cdcti${MODIFIED_ENVIRONMENT}docs -c '$web' -s ${{ steps.extract.outputs.destination }} diff --git a/.secrets.baseline b/.secrets.baseline index 14effbb95..f8d881d7f 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -223,5 +223,5 @@ } ] }, - "generated_at": "2023-10-27T15:37:42Z" + "generated_at": "2023-11-22T21:57:59Z" } diff --git a/operations/environments/staging/main.tf b/operations/environments/staging/main.tf index d1aa31efe..caf8c57b5 100644 --- a/operations/environments/staging/main.tf +++ b/operations/environments/staging/main.tf @@ -8,9 +8,9 @@ terraform { # Use a remote Terraform state in Azure Storage backend "azurerm" { - resource_group_name = "cdcti-terraform" - storage_account_name = "cdctiterraform" - container_name = "tfstate" + resource_group_name = "csels-rsti-stg-moderate-rg" + storage_account_name = "cdcintermediarytrfrmstg" + container_name = "terraform-state" key = "staging.terraform.tfstate" } } @@ -27,6 +27,6 @@ provider "azurerm" { module "template" { source = "../../template/" - environment = "staging" - deployer_id = "d59c2c86-de5e-41b7-a752-0869a73f5a60" //github app registration in Flexion Azure Entra + environment = "stg" + deployer_id = "f5feabe7-5d37-40ba-94f2-e5c0760b4561" //github app registration in CDC Azure Entra } diff --git a/operations/template/main.tf b/operations/template/main.tf index f10451e8d..30edbf352 100644 --- a/operations/template/main.tf +++ b/operations/template/main.tf @@ -1,8 +1,8 @@ locals { environment_to_rs_environment_prefix_mapping = { - dev = "staging" - staging = "staging" - prod = "" + dev = "staging" + stg = "staging" + prod = "" } selected_rs_environment_prefix = lookup(local.environment_to_rs_environment_prefix_mapping, var.environment, "staging") rs_domain_prefix = "${local.selected_rs_environment_prefix}${length(local.selected_rs_environment_prefix) == 0 ? "" : "."}" @@ -32,7 +32,7 @@ resource "azurerm_service_plan" "plan" { # Create the staging App Service resource "azurerm_linux_web_app" "api" { - name = "cdcti-${var.environment}-api2" + name = "cdcti-${var.environment}-api" resource_group_name = data.azurerm_resource_group.group.name location = azurerm_service_plan.plan.location service_plan_id = azurerm_service_plan.plan.id @@ -57,7 +57,7 @@ resource "azurerm_linux_web_app" "api" { } resource "azurerm_storage_account" "docs" { - name = "cdcti${var.environment}docs2" + name = "cdcti${var.environment}docs" resource_group_name = data.azurerm_resource_group.group.name location = data.azurerm_resource_group.group.location account_tier = "Standard"