You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the tags defined in run_tags are applied to the instance spun up by Packer. All the tags defined in run_tags are also inherited by the finished AMI. This is not always desirable, since one may want to have different set of tags on the instance for provisioning purposes. Attaching a relevant forum discussion: https://discuss.hashicorp.com/t/tags-and-run-tags/62748.
This feature addition might alleviate the pain caused in issue: #361, where the author of the issue requests for a feature to unset the run_tags on the finished AMI. This will not be a problem if the resulting AMI does not inherit them in the first place.
Potential configuration
I propose we add a new block, say run_instance_tags similar to run_volume_tags which specifies the tags to be applied to the EC2 instance spun up by Packer. This can be a template engine like other tags block.
if run_tags and run_instance_tags are defined, only tags in run_instance_tags will be applied to the instance spun up by Packer
if run_instance_tags is not defined, then the tags in run_tags will be applied to said EC2 instance.
Alternatively, one might decide to have another block -- say final_ami_tags which determines the set of tags on the final AMI. tags currently does this, but this does not unset the tags set using run_tags
Potential References
The text was updated successfully, but these errors were encountered:
Description
A written overview of the feature.
Currently, the tags defined in run_tags are applied to the instance spun up by Packer. All the tags defined in
run_tags
are also inherited by the finished AMI. This is not always desirable, since one may want to have different set of tags on the instance for provisioning purposes. Attaching a relevant forum discussion: https://discuss.hashicorp.com/t/tags-and-run-tags/62748.This feature addition might alleviate the pain caused in issue: #361, where the author of the issue requests for a feature to unset the
run_tags
on the finished AMI. This will not be a problem if the resulting AMI does not inherit them in the first place.Potential configuration
I propose we add a new block, say
run_instance_tags
similar to run_volume_tags which specifies the tags to be applied to the EC2 instance spun up by Packer. This can be a template engine like other tags block.run_tags
andrun_instance_tags
are defined, only tags inrun_instance_tags
will be applied to the instance spun up by Packerrun_instance_tags
is not defined, then the tags inrun_tags
will be applied to said EC2 instance.Alternatively, one might decide to have another block -- say
final_ami_tags
which determines the set of tags on the final AMI. tags currently does this, but this does not unset the tags set usingrun_tags
Potential References
The text was updated successfully, but these errors were encountered: