Skip to content

Commit f4ffc8f

Browse files
Update vent_creation.yml
1 parent b676f6f commit f4ffc8f

File tree

1 file changed

+15
-28
lines changed

1 file changed

+15
-28
lines changed

.github/workflows/vent_creation.yml

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -14,35 +14,29 @@ jobs:
1414
name: Terraform Plan
1515
runs-on: ubuntu-latest
1616

17-
env:
18-
ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }}
19-
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
20-
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
21-
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}
22-
2317
steps:
24-
- name: Checkout repository
18+
- name: Checkout code
2519
uses: actions/checkout@v4
2620

27-
- name: Set up Terraform
28-
uses: hashicorp/setup-terraform@v3
29-
with:
30-
terraform_version: 1.7.5
31-
3221
- name: Azure Login
3322
uses: azure/login@v2
3423
with:
3524
client-id: ${{ secrets.ARM_CLIENT_ID }}
3625
tenant-id: ${{ secrets.ARM_TENANT_ID }}
3726
subscription-id: ${{ secrets.ARM_SUBSCRIPTION_ID }}
3827

28+
- name: Set up Terraform
29+
uses: hashicorp/setup-terraform@v3
30+
with:
31+
terraform_version: 1.7.5
32+
3933
- name: Terraform Init
4034
run: terraform init
4135

4236
- name: Terraform Plan
4337
run: terraform plan -out=tfplan
4438

45-
- name: Upload Plan
39+
- name: Upload plan for manual review
4640
uses: actions/upload-artifact@v4
4741
with:
4842
name: tfplan
@@ -52,35 +46,28 @@ jobs:
5246
name: Terraform Apply
5347
runs-on: ubuntu-latest
5448
needs: terraform-plan
55-
environment: production-approval # 👈 This enables manual approval
56-
57-
env:
58-
ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }}
59-
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
60-
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
61-
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}
49+
environment: prod-approval
6250

6351
steps:
64-
- name: Checkout repository
52+
- name: Checkout code
6553
uses: actions/checkout@v4
6654

67-
- name: Set up Terraform
68-
uses: hashicorp/setup-terraform@v3
69-
with:
70-
terraform_version: 1.7.5
71-
7255
- name: Azure Login
7356
uses: azure/login@v2
7457
with:
7558
client-id: ${{ secrets.ARM_CLIENT_ID }}
7659
tenant-id: ${{ secrets.ARM_TENANT_ID }}
7760
subscription-id: ${{ secrets.ARM_SUBSCRIPTION_ID }}
7861

79-
- name: Download Plan
62+
- name: Set up Terraform
63+
uses: hashicorp/setup-terraform@v3
64+
with:
65+
terraform_version: 1.7.5
66+
67+
- name: Download approved plan
8068
uses: actions/download-artifact@v4
8169
with:
8270
name: tfplan
83-
path: .
8471

8572
- name: Terraform Apply
8673
run: terraform apply -auto-approve tfplan

0 commit comments

Comments
 (0)