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 }} diff --git a/operations/environments/flexion/main.tf b/operations/environments/internal/main.tf similarity index 88% rename from operations/environments/flexion/main.tf rename to operations/environments/internal/main.tf index 3dc680cd1..f9bc892a9 100644 --- a/operations/environments/flexion/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" } } @@ -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