Skip to content
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

Add "test" environment tag to temporary S3 test buckets used by CI #19359

Merged
merged 1 commit into from
Oct 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/bin/s3/setup-empty-s3-bucket.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ echo "The AWS S3 bucket ${S3_BUCKET_IDENTIFIER} in the region ${AWS_REGION} exis

echo "Tagging the AWS S3 bucket ${S3_BUCKET_IDENTIFIER} with TTL tags"

# "test" environment tag is needed so that the bucket gets cleaned up by the daily AWS resource cleanup job in case the
# temporary bucket is not properly cleaned up by delete-s3-bucket.sh. The ttl tag tells the AWS resource cleanup job
# when the bucket is expired and should be cleaned up
aws s3api put-bucket-tagging \
--bucket "${S3_BUCKET_IDENTIFIER}" \
--tagging "TagSet=[{Key=ttl,Value=${S3_BUCKET_TTL}}]"
--tagging "TagSet=[{Key=environment,Value=test},{Key=ttl,Value=${S3_BUCKET_TTL}}]"
Loading