Skip to content

Commit

Permalink
provider/aws: set default SG description
Browse files Browse the repository at this point in the history
because requiring a SG description is annoying
  • Loading branch information
phinze committed Apr 22, 2015
1 parent 92ebb60 commit 0798566
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion builtin/providers/aws/resource_aws_security_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ func resourceAwsSecurityGroup() *schema.Resource {

"description": &schema.Schema{
Type: schema.TypeString,
Required: true,
Optional: true,
Default: "Managed by Terraform",
},

"vpc_id": &schema.Schema{
Expand Down
4 changes: 2 additions & 2 deletions builtin/providers/aws/resource_aws_security_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ func TestAccAWSSecurityGroup_generatedName(t *testing.T) {
Config: testAccAWSSecurityGroupConfig_generatedName,
Check: resource.ComposeTestCheckFunc(
testAccCheckAWSSecurityGroupExists("aws_security_group.web", &group),
resource.TestCheckResourceAttr(
"aws_security_group.web", "description", "Managed by Terraform"),
func(s *terraform.State) error {
if group.GroupName == nil {
return fmt.Errorf("bad: No SG name")
Expand Down Expand Up @@ -549,8 +551,6 @@ resource "aws_security_group" "foo" {

const testAccAWSSecurityGroupConfig_generatedName = `
resource "aws_security_group" "web" {
description = "Used in the terraform acceptance tests"
ingress {
protocol = "tcp"
from_port = 80
Expand Down

0 comments on commit 0798566

Please sign in to comment.