providers/aws: fix tests for aws_security_group

This commit is contained in:
Jack Pearkes 2014-07-16 10:50:52 -04:00
parent dff47bdbbe
commit 0252b5e3e5
2 changed files with 11 additions and 2 deletions

View File

@ -117,7 +117,7 @@ func resource_aws_security_group_diff(
b := &diff.ResourceBuilder{
Attrs: map[string]diff.AttrType{
"name": diff.AttrTypeCreate,
"description": diff.AttrTypeCreate,
"description": diff.AttrTypeUpdate,
"vpc_id": diff.AttrTypeUpdate,
"ingress": diff.AttrTypeUpdate,
},
@ -184,7 +184,9 @@ func resource_aws_security_group_validation() *config.Validator {
Required: []string{
"name",
"ingress.*",
"ingress.",
"ingress.*.from_port",
"ingress.*.to_port",
"ingress.*.protocol",
},
Optional: []string{
"description",

View File

@ -96,5 +96,12 @@ const testAccAWSSecurityGroupConfig = `
resource "aws_security_group" "web" {
name = "terraform_acceptance_test_example"
description = "Used in the terraform acceptance tests"
ingress {
protocol = "tcp"
from_port = 80
to_port = 8000
cidr_blocks = ["10.0.0.0/0"]
}
}
`