fix: ESS stack clean up steps#9832
Merged
pkoutsovasilis merged 4 commits intoelastic:mainfrom Sep 10, 2025
Merged
Conversation
df7ea06 to
0234b52
Compare
0234b52 to
abee87b
Compare
|
Contributor
💚 Build Succeeded
History
|
Contributor
|
@Mergifyio backport 8.18 8.19 9.0 9.1 |
Contributor
✅ Backports have been createdDetails
|
mergify bot
pushed a commit
that referenced
this pull request
Sep 10, 2025
* fix: specify terraform env var everywhere * fix: proper env vars for ESS Stack clean up * fix: error when terraform fails to destroy ESS stack * fix: pass ess_region in terraform destroy (cherry picked from commit 6918b7b) # Conflicts: # .buildkite/bk.integration-fips.pipeline.yml # .buildkite/scripts/steps/ess.ps1
8 tasks
mergify bot
pushed a commit
that referenced
this pull request
Sep 10, 2025
* fix: specify terraform env var everywhere * fix: proper env vars for ESS Stack clean up * fix: error when terraform fails to destroy ESS stack * fix: pass ess_region in terraform destroy (cherry picked from commit 6918b7b)
mergify bot
pushed a commit
that referenced
this pull request
Sep 10, 2025
* fix: specify terraform env var everywhere * fix: proper env vars for ESS Stack clean up * fix: error when terraform fails to destroy ESS stack * fix: pass ess_region in terraform destroy (cherry picked from commit 6918b7b) # Conflicts: # .buildkite/bk.integration-fips.pipeline.yml
This was referenced Sep 10, 2025
mergify bot
pushed a commit
that referenced
this pull request
Sep 10, 2025
* fix: specify terraform env var everywhere * fix: proper env vars for ESS Stack clean up * fix: error when terraform fails to destroy ESS stack * fix: pass ess_region in terraform destroy (cherry picked from commit 6918b7b)
8 tasks
3 tasks
pkoutsovasilis
added a commit
that referenced
this pull request
Sep 10, 2025
* fix: ESS stack clean up steps (#9832) * fix: specify terraform env var everywhere * fix: proper env vars for ESS Stack clean up * fix: error when terraform fails to destroy ESS stack * fix: pass ess_region in terraform destroy (cherry picked from commit 6918b7b) # Conflicts: # .buildkite/bk.integration-fips.pipeline.yml # .buildkite/scripts/steps/ess.ps1 * fix: resolve conflicts --------- Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co>
pkoutsovasilis
added a commit
that referenced
this pull request
Sep 10, 2025
* fix: specify terraform env var everywhere * fix: proper env vars for ESS Stack clean up * fix: error when terraform fails to destroy ESS stack * fix: pass ess_region in terraform destroy (cherry picked from commit 6918b7b) Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co>
pkoutsovasilis
added a commit
that referenced
this pull request
Sep 10, 2025
* fix: specify terraform env var everywhere * fix: proper env vars for ESS Stack clean up * fix: error when terraform fails to destroy ESS stack * fix: pass ess_region in terraform destroy (cherry picked from commit 6918b7b) Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co>
pkoutsovasilis
added a commit
that referenced
this pull request
Sep 10, 2025
* fix: ESS stack clean up steps (#9832) * fix: specify terraform env var everywhere * fix: proper env vars for ESS Stack clean up * fix: error when terraform fails to destroy ESS stack * fix: pass ess_region in terraform destroy (cherry picked from commit 6918b7b) # Conflicts: # .buildkite/bk.integration-fips.pipeline.yml * fix: resolve conflicts --------- Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co>
intxgo
pushed a commit
to intxgo/elastic-agent
that referenced
this pull request
Sep 24, 2025
* fix: specify terraform env var everywhere * fix: proper env vars for ESS Stack clean up * fix: error when terraform fails to destroy ESS stack * fix: pass ess_region in terraform destroy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.





What does this PR do?
This PR fixes issues with ESS stack cleanup in CI by:
ASDF_TERRAFORM_VERSIONdefinition to the global pipeline environment so it is available to all steps, ensuringasdfprovides the requiredterraformbinary.ess_regionvariable explicitly toterraform destroyin both Bash and PowerShell scripts, since it is required to properly clean up FIPS ESS stacks that do not use the default region specified in Terraform files.Why is it important?
Without these changes, ESS stacks are not be cleaned up correctly after CI runs due to missing
terraformbinaries, unset environment variables, or incorrect region handling. This results in orphaned cloud resources, higher costs, and hitting stack quotas, which can block new CI runs from provisioning fresh environments.Before this PR link. With this PR link.
Checklist
./changelog/fragmentsusing the changelog toolDisruptive User Impact
None expected. These changes affect only CI pipelines and cleanup scripts.
How to test this PR locally
Open a draft PR and see that ESS cleanup steps are actually cleaning up the stacks.
Related issues
N/A