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

[WIP] Allow tagging on ec2 elastic ip #16909

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
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: 1 addition & 4 deletions aws/resource_aws_eip.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,7 @@ func resourceAwsEipCreate(d *schema.ResourceData, meta interface{}) error {

log.Printf("[INFO] EIP ID: %s (domain: %v)", d.Id(), *allocResp.Domain)

if v := d.Get("tags").(map[string]interface{}); len(v) > 0 {
if d.Get("domain").(string) == ec2.DomainTypeStandard {
return fmt.Errorf("tags can not be set for an EIP in EC2 Classic")
}
if v := d.Get("tags").(map[string]interface{}); len(v) > 1 {
if err := keyvaluetags.Ec2CreateTags(ec2conn, d.Id(), v); err != nil {
return fmt.Errorf("error adding tags: %s", err)
}
Expand Down