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,
|
Set: resourceAwsNetworkAclEntryHash,
|
||||||
},
|
},
|
||||||
|
"tags": tagsSchema(),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -157,6 +158,7 @@ func resourceAwsNetworkAclRead(d *schema.ResourceData, meta interface{}) error {
|
||||||
d.Set("vpc_id", networkAcl.VpcId)
|
d.Set("vpc_id", networkAcl.VpcId)
|
||||||
d.Set("ingress", ingressEntries)
|
d.Set("ingress", ingressEntries)
|
||||||
d.Set("egress", egressEntries)
|
d.Set("egress", egressEntries)
|
||||||
|
d.Set("tags", tagsToMap(networkAcl.Tags))
|
||||||
|
|
||||||
return nil
|
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)
|
d.Partial(false)
|
||||||
return resourceAwsNetworkAclRead(d, meta)
|
return resourceAwsNetworkAclRead(d, meta)
|
||||||
}
|
}
|
||||||
|
|
|
@ -203,6 +203,7 @@ func TestAccAWSNetworkAclsOnlyEgressRules(t *testing.T) {
|
||||||
Config: testAccAWSNetworkAclEgressConfig,
|
Config: testAccAWSNetworkAclEgressConfig,
|
||||||
Check: resource.ComposeTestCheckFunc(
|
Check: resource.ComposeTestCheckFunc(
|
||||||
testAccCheckAWSNetworkAclExists("aws_network_acl.bond", &networkAcl),
|
testAccCheckAWSNetworkAclExists("aws_network_acl.bond", &networkAcl),
|
||||||
|
testAccCheckTags(&networkAcl.Tags, "foo", "bar"),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -392,6 +393,10 @@ resource "aws_network_acl" "bond" {
|
||||||
from_port = 22
|
from_port = 22
|
||||||
to_port = 22
|
to_port = 22
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tags {
|
||||||
|
foo = "bar"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue