providers/aws: fix tests for aws_security_group
This commit is contained in:
parent
dff47bdbbe
commit
0252b5e3e5
|
@ -117,7 +117,7 @@ func resource_aws_security_group_diff(
|
||||||
b := &diff.ResourceBuilder{
|
b := &diff.ResourceBuilder{
|
||||||
Attrs: map[string]diff.AttrType{
|
Attrs: map[string]diff.AttrType{
|
||||||
"name": diff.AttrTypeCreate,
|
"name": diff.AttrTypeCreate,
|
||||||
"description": diff.AttrTypeCreate,
|
"description": diff.AttrTypeUpdate,
|
||||||
"vpc_id": diff.AttrTypeUpdate,
|
"vpc_id": diff.AttrTypeUpdate,
|
||||||
"ingress": diff.AttrTypeUpdate,
|
"ingress": diff.AttrTypeUpdate,
|
||||||
},
|
},
|
||||||
|
@ -184,7 +184,9 @@ func resource_aws_security_group_validation() *config.Validator {
|
||||||
Required: []string{
|
Required: []string{
|
||||||
"name",
|
"name",
|
||||||
"ingress.*",
|
"ingress.*",
|
||||||
"ingress.",
|
"ingress.*.from_port",
|
||||||
|
"ingress.*.to_port",
|
||||||
|
"ingress.*.protocol",
|
||||||
},
|
},
|
||||||
Optional: []string{
|
Optional: []string{
|
||||||
"description",
|
"description",
|
||||||
|
|
|
@ -96,5 +96,12 @@ const testAccAWSSecurityGroupConfig = `
|
||||||
resource "aws_security_group" "web" {
|
resource "aws_security_group" "web" {
|
||||||
name = "terraform_acceptance_test_example"
|
name = "terraform_acceptance_test_example"
|
||||||
description = "Used in the terraform acceptance tests"
|
description = "Used in the terraform acceptance tests"
|
||||||
|
|
||||||
|
ingress {
|
||||||
|
protocol = "tcp"
|
||||||
|
from_port = 80
|
||||||
|
to_port = 8000
|
||||||
|
cidr_blocks = ["10.0.0.0/0"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|
Loading…
Reference in New Issue