[SE-5006] fix: deprovision s3 buckets with better filtering
Description
When deprovisioning S3 bucket for an instance, we need to check for both the instance and bucket names. In case of any of them meet the conditions, we must deprovision the related bucket.
Supporting information
Related PRs:
Dependencies
N/A
Testing instructions
- Run the command on stage and prod using the
--dry-run
flag - Check for the output for any suspicious instance name
- Run the commands without the
--dry-run
flag - Check that the AWS buckets are removed
Deadline
ASAP
Other information
A new --dry-run
option is added beside the fix to ensure we can run the command without any harm.