added tags for aws_network_acl
This commit is contained in:
parent
f1cb297c59
commit
5e3e8562fc
|
@ -101,6 +101,7 @@ func resourceAwsNetworkAcl() *schema.Resource {
|
|||
},
|
||||
Set: resourceAwsNetworkAclEntryHash,
|
||||
},
|
||||
"tags": tagsSchema(),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -157,6 +158,7 @@ func resourceAwsNetworkAclRead(d *schema.ResourceData, meta interface{}) error {
|
|||
d.Set("vpc_id", networkAcl.VpcId)
|
||||
d.Set("ingress", ingressEntries)
|
||||
d.Set("egress", egressEntries)
|
||||
d.Set("tags", tagsToMap(networkAcl.Tags))
|
||||
|
||||
return nil
|
||||
}
|
||||
|
@ -194,6 +196,12 @@ func resourceAwsNetworkAclUpdate(d *schema.ResourceData, meta interface{}) error
|
|||
}
|
||||
}
|
||||
|
||||
if err := setTags(ec2conn, d); err != nil {
|
||||
return err
|
||||
} else {
|
||||
d.SetPartial("tags")
|
||||
}
|
||||
|
||||
d.Partial(false)
|
||||
return resourceAwsNetworkAclRead(d, meta)
|
||||
}
|
||||
|
|
|
@ -203,6 +203,7 @@ func TestAccAWSNetworkAclsOnlyEgressRules(t *testing.T) {
|
|||
Config: testAccAWSNetworkAclEgressConfig,
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
testAccCheckAWSNetworkAclExists("aws_network_acl.bond", &networkAcl),
|
||||
testAccCheckTags(&networkAcl.Tags, "foo", "bar"),
|
||||
),
|
||||
},
|
||||
},
|
||||
|
@ -392,6 +393,10 @@ resource "aws_network_acl" "bond" {
|
|||
from_port = 22
|
||||
to_port = 22
|
||||
}
|
||||
|
||||
tags {
|
||||
foo = "bar"
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
|
|
Loading…
Reference in New Issue