File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,12 +71,14 @@ jobs:
7171 unset AWS_PROFILE
7272 terraform plan -out planfile
7373
74- # Upload the plan as an artifact
75- - name : Upload Terraform plan
76- uses : actions/upload-artifact@v4
77- with :
78- name : terraform-${{ env.ENVIRONMENT }}-plan
79- path : terraform/${{ env.ENVIRONMENT }}/planfile
80- if-no-files-found : ' warn'
81- retention-days : 1
82- overwrite : true
74+ # ---------------------
75+ - name : Terraform apply
76+ run : |
77+ cd terraform
78+ cat .envrc | grep -vE '^(dotenv_if_exists|source_env)' > .envrc.good
79+ . ./.envrc.good
80+ cd ${{ env.ENVIRONMENT }}
81+ cat .envrc | grep -vE '^(dotenv_if_exists|source_env)' > .envrc.good
82+ . ./.envrc.good
83+ unset AWS_PROFILE
84+ terraform apply -input=false planfile
Original file line number Diff line number Diff line change @@ -71,12 +71,14 @@ jobs:
7171 unset AWS_PROFILE
7272 terraform plan -out planfile
7373
74- # Upload the plan as an artifact
75- - name : Upload Terraform plan
76- uses : actions/upload-artifact@v4
77- with :
78- name : terraform-${{ env.ENVIRONMENT }}-plan
79- path : terraform/${{ env.ENVIRONMENT }}/planfile
80- if-no-files-found : ' warn'
81- retention-days : 1
82- overwrite : true
74+ # ---------------------
75+ - name : Terraform apply
76+ run : |
77+ cd terraform
78+ cat .envrc | grep -vE '^(dotenv_if_exists|source_env)' > .envrc.good
79+ . ./.envrc.good
80+ cd ${{ env.ENVIRONMENT }}
81+ cat .envrc | grep -vE '^(dotenv_if_exists|source_env)' > .envrc.good
82+ . ./.envrc.good
83+ unset AWS_PROFILE
84+ terraform apply -input=false planfile
You can’t perform that action at this time.
0 commit comments