-
-
Notifications
You must be signed in to change notification settings - Fork 3
Fix | Remove reference to Terraform in error message #312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
1730c01
636dba8
1113786
3fc4eec
78d61d0
d14d7c9
cc92f21
79b365b
b76fffc
8e1160f
3501126
bb1d1d4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -25,8 +25,8 @@ jobs: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| strategy: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| max-parallel: 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| matrix: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| python-version: ['3.9.15', '3.10.8', '3.11.8', '3.12.7'] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| toolbox-image-tag: ['1.3.5-0.2.0', '1.5.0-0.2.0', '1.6.0-0.2.0'] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| toolbox-image-tag: ['1.3.5-0.2.3', '1.5.0-0.2.3', '1.6.0-0.2.3'] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Checkout base branch | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: actions/checkout@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -141,7 +141,7 @@ jobs: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| printf "[INFO] Testing terraform\n" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| printf "[INFO] Initializing layer\n" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| leverage tf init --skip-validation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| leverage terraform init --skip-validation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| working-directory: ../theadamproject/security/us-east-1/base-tf-backend | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -203,19 +203,19 @@ jobs: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| printf "[INFO] Initializing layer\n" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| leverage tf init --layers cli-test-layer,base-identities | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| leverage terraform init --layers cli-test-layer,base-identities | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| printf "[INFO] Generating plan\n" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| leverage tf plan --layers cli-test-layer | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| leverage terraform plan --layers cli-test-layer | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| printf "[INFO] Applying changes\n" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| leverage tf apply -auto-approve --layers cli-test-layer | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| leverage terraform apply -auto-approve --layers cli-test-layer | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| printf "[INFO] Checking if all changes were applied\n" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| leverage tf plan -detailed-exitcode --layers cli-test-layer | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| leverage terraform plan -detailed-exitcode --layers cli-test-layer | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| [[ $? -eq 2 ]] && printf "[WARN] There are still remaining changes\n" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| [[ $? -eq 0 ]] && printf "[INFO] Apply checks out\n" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
205
to
217
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: exit code checks are incorrect due to clobbered After - leverage terraform plan -detailed-exitcode --layers cli-test-layer
- [[ $? -eq 2 ]] && printf "[WARN] There are still remaining changes\n"
- [[ $? -eq 0 ]] && printf "[INFO] Apply checks out\n"
+ leverage terraform plan -detailed-exitcode --layers cli-test-layer
+ plan_rc=$?
+ if [[ $plan_rc -eq 2 ]]; then
+ printf "[WARN] There are still remaining changes\n"
+ elif [[ $plan_rc -eq 0 ]]; then
+ printf "[INFO] Apply checks out\n"
+ else
+ printf "[ERROR] Unexpected terraform plan exit code: %d\n" "$plan_rc"
+ exit $plan_rc
+ fi📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| printf "[INFO] Destroying all generated created resources\n" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| leverage tf destroy -auto-approve --layers cli-test-layer | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| leverage terraform destroy -auto-approve --layers cli-test-layer | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| working-directory: ../theblairwitchproject/apps-devstg/global | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.