From e928a27f939b02802a41e9ea65d7207f41edc165 Mon Sep 17 00:00:00 2001 From: halprin Date: Mon, 2 Oct 2023 09:26:21 -0600 Subject: [PATCH 1/3] 496: Rename flexion environment to internal --- operations/environments/{flexion => internal}/main.tf | 2 +- operations/environments/{flexion => internal}/outputs.tf | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename operations/environments/{flexion => internal}/main.tf (96%) rename operations/environments/{flexion => internal}/outputs.tf (100%) diff --git a/operations/environments/flexion/main.tf b/operations/environments/internal/main.tf similarity index 96% rename from operations/environments/flexion/main.tf rename to operations/environments/internal/main.tf index 3dc680cd1..0f4b143e2 100644 --- a/operations/environments/flexion/main.tf +++ b/operations/environments/internal/main.tf @@ -27,6 +27,6 @@ provider "azurerm" { module "template" { source = "../../template/" - environment = "flexion" + environment = "internal" deployer_id = "d59c2c86-de5e-41b7-a752-0869a73f5a60" //github app registration in Flexion Azure Entra } diff --git a/operations/environments/flexion/outputs.tf b/operations/environments/internal/outputs.tf similarity index 100% rename from operations/environments/flexion/outputs.tf rename to operations/environments/internal/outputs.tf From b9a17d406646fcb494f5c163b259c0ba238a3150 Mon Sep 17 00:00:00 2001 From: halprin Date: Mon, 2 Oct 2023 11:12:24 -0600 Subject: [PATCH 2/3] 496: rename the TF state file to reference the internal environment --- operations/environments/internal/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/operations/environments/internal/main.tf b/operations/environments/internal/main.tf index 0f4b143e2..f9bc892a9 100644 --- a/operations/environments/internal/main.tf +++ b/operations/environments/internal/main.tf @@ -11,7 +11,7 @@ terraform { resource_group_name = "cdcti-terraform" storage_account_name = "cdctiterraform" container_name = "tfstate" - key = "flexion.terraform.tfstate" + key = "internal.terraform.tfstate" } } From 23a397780e30b93da2ff7d0e73c8ae72d7225fbe Mon Sep 17 00:00:00 2001 From: halprin Date: Mon, 2 Oct 2023 11:18:15 -0600 Subject: [PATCH 3/3] 496: Create the GitHub action workflow to deploy to the internal environment --- .github/workflows/internal-deploy.yml | 36 +++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/internal-deploy.yml diff --git a/.github/workflows/internal-deploy.yml b/.github/workflows/internal-deploy.yml new file mode 100644 index 000000000..b0f9e4766 --- /dev/null +++ b/.github/workflows/internal-deploy.yml @@ -0,0 +1,36 @@ +name: Deploy to Internal Environment + +on: + push: + branches: + - internal + workflow_dispatch: + +jobs: + + terraform-deploy: + name: Internal Infrastructure Deploy + uses: ./.github/workflows/terraform-deploy_reusable.yml + with: + TERRAFORM_DIRECTORY: operations/environments/internal + secrets: + AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} + AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} + AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} + + internal-deploy: + name: Internal Application Deploy + needs: terraform-deploy + uses: ./.github/workflows/deploy_reusable.yml + with: + ENVIRONMENT: internal + REPO: trusted-intermediary-router + REPO_DOCS: trusted-intermediary-docs + APP: ${{ needs.terraform-deploy.outputs.APP }} + REGISTRY: ${{ needs.terraform-deploy.outputs.REGISTRY }} + secrets: + ACR_USERNAME: ${{ needs.terraform-deploy.outputs.ACR_USERNAME }} + ACR_PASSWORD: ${{ needs.terraform-deploy.outputs.ACR_PASSWORD }} + AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} + AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} + AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}