Skip to content

Update command used for cloud-reaper tool#3198

Merged
mrodm merged 10 commits intoelastic:mainfrom
mrodm:update_command_cloud_cleanup
Jan 20, 2026
Merged

Update command used for cloud-reaper tool#3198
mrodm merged 10 commits intoelastic:mainfrom
mrodm:update_command_cloud_cleanup

Conversation

@mrodm
Copy link
Contributor

@mrodm mrodm commented Jan 12, 2026

Update the cloud-reaper command used when DRY_RUN false is set to be destroy --confirm.

This PR also updates how the output of the tool is scanned to detect failures.

Related BK builds:

Addition:

@mrodm mrodm self-assigned this Jan 12, 2026
@mrodm mrodm marked this pull request as ready for review January 12, 2026 11:29
@mrodm mrodm requested a review from a team as a code owner January 12, 2026 11:29
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @mrodm


RESOURCE_RETENTION_PERIOD="${RESOURCE_RETENTION_PERIOD:-"24 hours"}"
DRY_RUN="$(buildkite-agent meta-data get DRY_RUN --default "${DRY_RUN:-"true"}")"
RESOURCE_RETENTION_PERIOD="$(buildkite-agent meta-data get RESOURCE_RETENTION_PERIOD --default "${RESOURCE_RETENTION_PERIOD:-"24 hours"}")"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allow to overwrite the Retention Period via buildkite input parameter. This could be helpful for testing or debugging triggering the pipeline via UI.

key: "RESOURCE_RETENTION_PERIOD"
required: false
default: "24 hours"
if: "build.source == 'ui'"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Required to avoid triggering this input block in the pipeline triggered by the daily CI jobs.

image image

# TODO: to be changed to "destroy --confirm" once it can be tested
# that filters work as expected
COMMAND="plan"
COMMAND="destroy --confirm"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As it has been tested with stale resources, I think this can be changed to run the destroy command if DRY_RUN false.

@mrodm mrodm merged commit 6dd5a01 into elastic:main Jan 20, 2026
3 checks passed
@mrodm mrodm deleted the update_command_cloud_cleanup branch January 20, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants