Bugfix: Add tags on AWS IG creation, not just on update
This commit is contained in:
parent
263395a9f0
commit
c7ccf4f74d
|
@ -43,6 +43,11 @@ func resourceAwsInternetGatewayCreate(d *schema.ResourceData, meta interface{})
|
|||
d.SetId(*ig.InternetGatewayID)
|
||||
log.Printf("[INFO] InternetGateway ID: %s", d.Id())
|
||||
|
||||
err = setTagsSDK(ec2conn, d)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Attach the new gateway to the correct vpc
|
||||
return resourceAwsInternetGatewayAttach(d, meta)
|
||||
}
|
||||
|
|
|
@ -98,6 +98,7 @@ func TestAccInternetGateway_tags(t *testing.T) {
|
|||
Config: testAccCheckInternetGatewayConfigTags,
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
testAccCheckInternetGatewayExists("aws_internet_gateway.foo", &v),
|
||||
testAccCheckTagsSDK(&v.Tags, "foo", "bar"),
|
||||
),
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue