Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws_default_security_group : missing description attribute #11650

Merged
merged 1 commit into from
Feb 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions aws/resource_aws_default_security_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ func resourceAwsDefaultSecurityGroup() *schema.Resource {
dsg.Create = resourceAwsDefaultSecurityGroupCreate
dsg.Delete = resourceAwsDefaultSecurityGroupDelete

// Descriptions cannot be updated
delete(dsg.Schema, "description")
// description is a computed value for Default Security Groups and cannot be changed
dsg.Schema["description"] = &schema.Schema{
Type: schema.TypeString,
Computed: true,
}

// name is a computed value for Default Security Groups and cannot be changed
delete(dsg.Schema, "name_prefix")
Expand Down
2 changes: 2 additions & 0 deletions aws/resource_aws_default_security_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ func TestAccAWSDefaultSecurityGroup_basic(t *testing.T) {
testAccCheckAWSDefaultSecurityGroupAttributes(&group),
resource.TestCheckResourceAttr(
"aws_default_security_group.web", "name", "default"),
resource.TestCheckResourceAttr(
"aws_default_security_group.web", "description", "default VPC security group"),
resource.TestCheckResourceAttr(
"aws_default_security_group.web", "ingress.3629188364.protocol", "tcp"),
resource.TestCheckResourceAttr(
Expand Down