diff --git a/aws/data_source_aws_security_group.go b/aws/data_source_aws_security_group.go index 223d33823f1..9574da7edc0 100644 --- a/aws/data_source_aws_security_group.go +++ b/aws/data_source_aws_security_group.go @@ -38,6 +38,11 @@ func dataSourceAwsSecurityGroup() *schema.Resource { }, "tags": tagsSchemaComputed(), + + "description": { + Type: schema.TypeString, + Computed: true, + }, }, } } diff --git a/aws/data_source_aws_security_group_test.go b/aws/data_source_aws_security_group_test.go index 6e1f1664a83..3dbb7826a44 100644 --- a/aws/data_source_aws_security_group_test.go +++ b/aws/data_source_aws_security_group_test.go @@ -21,6 +21,7 @@ func TestAccDataSourceAwsSecurityGroup(t *testing.T) { Config: testAccDataSourceAwsSecurityGroupConfig(rInt), Check: resource.ComposeTestCheckFunc( testAccDataSourceAwsSecurityGroupCheck("data.aws_security_group.by_id"), + resource.TestCheckResourceAttr("data.aws_security_group.by_id", "description", "sg description"), testAccDataSourceAwsSecurityGroupCheck("data.aws_security_group.by_tag"), testAccDataSourceAwsSecurityGroupCheck("data.aws_security_group.by_filter"), testAccDataSourceAwsSecurityGroupCheck("data.aws_security_group.by_name"), @@ -121,6 +122,7 @@ func testAccDataSourceAwsSecurityGroupConfig(rInt int) string { Name = "tf-acctest" Seed = "%d" } + description = "sg description" } data "aws_security_group" "by_id" {