Skip to content

Conversation

@mrodm
Copy link
Contributor

@mrodm mrodm commented Mar 5, 2024

Add checks into cloud cleanup script so it is sent an email notification if there is any redshift cluster stale related to CI (integrations or elastic-package).

To be replaced by cloud-reapder when there is support for this kind of resources.

Example of build with this cloud cleanup step:
https://buildkite.com/elastic/elastic-package/builds/2527

Added input steps when this pipeline is triggered from the UI.

Relates #1700

@mrodm mrodm self-assigned this Mar 5, 2024
@mrodm mrodm marked this pull request as ready for review March 5, 2024 16:56
@mrodm mrodm requested a review from a team March 5, 2024 16:56
resources:
- type: 'node'
regions:
- us-east-1
Copy link
Member

Choose a reason for hiding this comment

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

Do we have the region in some environment variable that we could use here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Currently, it is using the default region set in the terraform files, there is no value set in our scripts. For instance:

https://github.com/elastic/integrations/blob/4efd95037467d5e54270006bcd71c3b0b6982932/packages/cisco_umbrella/_dev/deploy/tf/env.yml#L9

Should we add a value there in our scripts for both repositories or rely on that default value?
Currently, all terraform tags are set in the pre-command hook:

# variables required for terraform

Maybe, we could add/set there the variable export AWS_REGION=us-east-1 too.

--context "ctx-cloud-reaper-error" \
--style "error"
fi
exit 1
Copy link
Member

Choose a reason for hiding this comment

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

Do we want to exit here? We could continue and check other resources, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I forgot to remove this exit!
I've updated the code to allow running all steps and just exit with failure at the end.

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @mrodm

@mrodm mrodm requested a review from jsoriano March 6, 2024 11:25
@mrodm mrodm merged commit cc43d5c into elastic:main Mar 7, 2024
@mrodm mrodm deleted the add_redshift_check_cloud_cleanup branch March 7, 2024 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants