Skip to content

Commit 5c0f412

Browse files
Nilesh Gadgianmolnagpal
andauthored
fix: pass aws region input and fix variables (#17)
Co-authored-by: Anmol Nagpal <[email protected]>
1 parent 2be98f6 commit 5c0f412

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed
Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,27 @@ on:
66
workflow_call:
77
inputs:
88
working_directory:
9-
description: 'Root directory of the terraform where all resources exist.'
109
required: true
1110
type: string
1211
default: _example
12+
description: 'Root directory of the terraform where all resources exist.'
1313
provider:
14-
description: 'Cloud provider to run the workflow. e.g. azurerm or aws'
1514
required: true
1615
type: string
1716
default: azurerm
17+
description: 'Cloud provider to run the workflow. e.g. azurerm or aws'
18+
aws_region:
19+
required: false
20+
type: string
21+
default: us-east-1
22+
description: 'AWS region of terraform deployment.'
1823

1924
#Special permissions required for OIDC authentication
2025
permissions:
2126
id-token: write
2227
contents: read
2328
issues: write
2429

25-
#These environment variables are used by the terraform azure provider to setup OIDD authenticate.
26-
env:
27-
ARM_CLIENT_ID: "${{ secrets.AZURE_CLIENT_ID }}"
28-
ARM_SUBSCRIPTION_ID: "${{ secrets.AZURE_SUBSCRIPTION_ID }}"
29-
ARM_TENANT_ID: "${{ secrets.AZURE_TENANT_ID }}"
30-
3130
jobs:
3231
terraform-plan:
3332
name: 'Terraform Plan'
@@ -50,7 +49,7 @@ jobs:
5049
with:
5150
aws-access-key-id: ${{ secrets.aws_access_key_id }}
5251
aws-secret-access-key: ${{ secrets.aws_secret_access_key }}
53-
aws-region: us-east-2
52+
aws-region: ${{ inputs.aws_region }}
5453

5554
# Install azure-cli
5655
- name: Install Azure CLI
@@ -210,4 +209,4 @@ jobs:
210209
# Mark the workflow as failed if drift detected
211210
- name: Error on Failure
212211
if: steps.tf-plan.outputs.exitcode == 2
213-
run: exit 1
212+
run: exit 1

0 commit comments

Comments
 (0)