File tree Expand file tree Collapse file tree 3 files changed +16
-8
lines changed Expand file tree Collapse file tree 3 files changed +16
-8
lines changed Original file line number Diff line number Diff line change 28
28
required : false
29
29
type : boolean
30
30
default : false
31
- description : ' Set true to to destroy terraform infrastructure.'
31
+ description : ' Set true to destroy terraform infrastructure.'
32
32
approvers :
33
33
required : false
34
34
type : string
35
35
description : ' Approvals list to approve apply or destroy'
36
36
terraform_version :
37
37
type : string
38
38
default : 1.3.6
39
- description : ' Required erraform version '
39
+ description : ' Required Terraform version'
40
40
timeout :
41
41
required : false
42
42
type : number
76
76
required : false
77
77
type : string
78
78
default : " "
79
+ plan_only :
80
+ description : " Set this to `true` to run `terraform plan` only"
81
+ required : false
82
+ type : boolean
83
+ default : false
79
84
secrets :
80
85
AZURE_CREDENTIALS :
81
86
required : false
@@ -239,6 +244,7 @@ jobs:
239
244
echo "${delimiter}" >> $GITHUB_OUTPUT
240
245
241
246
- name : " Accept plan or deny"
247
+ if : ${{ inputs.plan_only != true }}
242
248
uses : trstringer/manual-approval@v1
243
249
timeout-minutes : ${{ inputs.timeout }}
244
250
with :
@@ -248,7 +254,7 @@ jobs:
248
254
issue-title : " Terraform Plan for Infrastructure Update"
249
255
250
256
- name : terraform apply
251
- if : ${{ inputs.destroy != true }}
257
+ if : ${{ inputs.destroy != true && inputs.plan_only != true }}
252
258
run : |
253
259
if [ -n "${{ inputs.var_file }}" ]; then
254
260
cd ${{ inputs.working_directory }}
Original file line number Diff line number Diff line change 17
17
tf-static-checks :
18
18
uses : clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@master
19
19
with :
20
- working_directory : ' ./_example/complete/'
21
- # terraform_version: 0.12.31 // Specify the Terraform version to use. Uncomment and provide your desired version, or leave it as is to use the latest version.
22
- aws_credentials : false // Provide your AWS Credentails ID here if 'aws_credentials' is set to 'true'.
20
+ working_directory : # Specify terraform code directory in repo, eg. './_example/complete/'
21
+ terraform_version : # Specify terraform version e.g 1.3.6
22
+ provider : # aws
23
+ aws_region : # specify region eg. us-east-2
23
24
secrets :
24
25
AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
25
26
AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Original file line number Diff line number Diff line change @@ -19,12 +19,13 @@ jobs:
19
19
uses : clouddrove/github-shared-workflows/.github/workflows/terraform_workflow.yml@master
20
20
with :
21
21
provider : # aws
22
- working_directory : # Specify terraform code directory in repo
23
- var_file : # name of tfvar file e.g "variable.tfvar"
22
+ working_directory : # Specify terraform code directory in repo, eg. './_example/complete/'
23
+ var_file : # name of tfvar file, eg. "variable.tfvar"
24
24
aws_region : # specify region eg. us-east-2
25
25
approvers : # Assignee name for approve apply or destroy step
26
26
minimum-approvals : # Minimum number of approvals required to progress the workflow, deafault value is 1
27
27
terraform_version : # Specify terraform version e.g 1.3.6
28
+ plan_only : # If the value is set to true, the workflow will only show terraform plan
28
29
destroy : # If the value is set to true, the workflow proceeds to the destroy step. However, the default value is false
29
30
secrets :
30
31
AWS_ACCESS_KEY_ID : # Specify AWS Access key ID
You can’t perform that action at this time.
0 commit comments