-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Added tagging support for amazon/ebs AMIs #233
Conversation
Nice, this is really useful. |
@@ -18,6 +19,7 @@ type RunConfig struct { | |||
SecurityGroupId string `mapstructure:"security_group_id"` | |||
SubnetId string `mapstructure:"subnet_id"` | |||
VpcId string `mapstructure:"vpc_id"` | |||
Tags []ec2.Tag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't really belong in RunConfig
, because it isn't common to all configs necessary to run EC2 instances. This instead belongs in some general EBS config.
Very good! Some nitpicks but I don't mind merging as is and CCing you to show you what I would change:
|
Oops, wrong button. :( What I meant to do was say I will start working on those changes and updating the commit. Sorry about that... |
@mitchellh New changes are in. Please let me know if that's better. Sorry about the goof up earlier! |
I'm curious what people think about the syntax for the tags being:
vs. the possibly more concise:
BTW, I already have the latter prototyped in a patch on top of your latest pull request. |
I like that a lot better. |
@@ -107,7 +135,9 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe | |||
}, | |||
&common.StepProvision{}, | |||
&stepStopInstance{}, | |||
&stepCreateAMI{}, | |||
&stepCreateAMI{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since type has only one item encapsulated in it, I'd recommend making this more idiomatic:
&stepCreateAMI{b.config.ec2Tags}
@markpeek, updated Tags per your recommendation. |
builder/amazon/ebs: Added tagging support for amazon/ebs AMIs
Refactor the EBS ami tag into a common step and add support for instance-store ami tags. /cc @jmassara
Thank you @jmassara for the AMI tag feature. |
builder/amazon/ebs: Added tagging support for amazon/ebs AMIs
Refactor the EBS ami tag into a common step and add support for instance-store ami tags. /cc @jmassara
…vagrant post-processor. The code originate from https://github.com/YungSang/packer-parallels
…vagrant post-processor. Fixes rickard-von-essen/packer-parallels#3
Add tags to an amazon/ebs AMI. Example configuration: