Skip to content

Commit

Permalink
add tf_environment to release ms
Browse files Browse the repository at this point in the history
  • Loading branch information
manuraf committed Feb 7, 2024
1 parent 5212488 commit 38a5dd7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/call_release_ms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
environment:
type: string
required: true
pnpg_suffix:
tf_environment:
type: string
required: false

Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
tenant_id: ${{ vars.AZURE_TENANT_ID }}
subscription_id: ${{ vars.AZURE_SUBSCRIPTION_ID }}
dir: ${{ env.DIR }}
azure_environment: ${{ inputs.environment }}${{ inputs.pnpg_suffix }}
azure_environment: ${{ inputs.tf_environment }}
env:
TF_VAR_image_tag: ${{ steps.setsha.outputs.short_sha }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -115,7 +115,7 @@ jobs:
uses: actions/upload-artifact@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6 # v4.2.0
with:
name: tfplan
path: ${{ env.DIR }}/tfplan-${{ inputs.environment }}${{ inputs.pnpg_suffix }}-${{ github.sha }}
path: ${{ env.DIR }}/tfplan-${{ inputs.tf_environment }}-${{ github.sha }}
if-no-files-found: error
retention-days: 14

Expand Down Expand Up @@ -167,12 +167,12 @@ jobs:
shell: bash
working-directory: ${{ env.DIR }}
run: |
bash ./terraform.sh init ${{ inputs.environment }}${{ inputs.pnpg_suffix }}
bash ./terraform.sh init ${{ inputs.tf_environment }}
- name: Terraform Apply
shell: bash
working-directory: ${{ env.DIR }}
run: |
terraform apply -lock-timeout=3000s -auto-approve -input=false tfplan-${{ inputs.environment }}${{ inputs.pnpg_suffix }}-${{ github.sha }}
terraform apply -lock-timeout=3000s -auto-approve -input=false tfplan-${{ inputs.tf_environment }}-${{ github.sha }}
env:
TF_VAR_image_tag: ${{ needs.tf_plan.outputs.image_tag }}
6 changes: 3 additions & 3 deletions .github/workflows/release_pnpg_ms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
secrets: inherit
with:
environment: dev
pnpg_suffix: -pnpg
tf_environment: dev-pnpg

release_uat:
uses: ./.github/workflows/call_release_ms.yml
Expand All @@ -31,7 +31,7 @@ jobs:
secrets: inherit
with:
environment: uat
pnpg_suffix: -pnpg
tf_environment: uat-pnpg

release_prod:
uses: ./.github/workflows/call_release_ms.yml
Expand All @@ -40,4 +40,4 @@ jobs:
secrets: inherit
with:
environment: prod
pnpg_suffix: -pnpg
tf_environment: prod-pnpg

0 comments on commit 38a5dd7

Please sign in to comment.