From 0252b5e3e567785094d536ba2462ec4671471f63 Mon Sep 17 00:00:00 2001 From: Jack Pearkes Date: Wed, 16 Jul 2014 10:50:52 -0400 Subject: [PATCH] providers/aws: fix tests for aws_security_group --- builtin/providers/aws/resource_aws_security_group.go | 6 ++++-- builtin/providers/aws/resource_aws_security_group_test.go | 7 +++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/builtin/providers/aws/resource_aws_security_group.go b/builtin/providers/aws/resource_aws_security_group.go index 2350a5c12..f7cdb4c9f 100644 --- a/builtin/providers/aws/resource_aws_security_group.go +++ b/builtin/providers/aws/resource_aws_security_group.go @@ -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", diff --git a/builtin/providers/aws/resource_aws_security_group_test.go b/builtin/providers/aws/resource_aws_security_group_test.go index 367839cee..8aac3ed09 100644 --- a/builtin/providers/aws/resource_aws_security_group_test.go +++ b/builtin/providers/aws/resource_aws_security_group_test.go @@ -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"] + } } `