AWS: Allow setting tags to snapshots or AMIs only #38
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.
This commit introduces two new optional properties on
AWSPublishingMetadata
namedsnapshot_tags
andami_tags
, which when set allows to add tags just for snapshot imports or the registered image respectively.Rationale: Currently our team is facing sporadic issues on community AMIs workflow when uploading the image to different billing types (
access
orhourly
) after a retry, as the second attempt will look for the image name, fail to find, search for tags and find an AMI which concerns the other billing type. This was initially fixed by release-engineering/pubtools-marketplacesvm#74 by adding the billing type as tags. However, the fix brings another potential issue: we will tag everything with the billing tags, including the S3 object, which could being unecessarily uploaded twice, as well as having a tag which doesn't concern the S3 RAW object, but the snapshot/image only.With this change on
cloudimg
we aim to provide the billing type tags just for the snapshot and AMI, leaving the S3 object with the previous ones as it shouldn't receive the billing tag.This change also allows other teams to have a more granular control on which tags should go where.
Refers to SPSTRAT-451