Skip to content

Commit

Permalink
Merge pull request #1943 from darkowlzz/sg-description
Browse files Browse the repository at this point in the history
data_source_aws_security_group: add description
  • Loading branch information
Ninir authored Oct 18, 2017
2 parents d6b12ce + e82313f commit c33cd2f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions aws/data_source_aws_security_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ func dataSourceAwsSecurityGroup() *schema.Resource {
},

"tags": tagsSchemaComputed(),

"description": {
Type: schema.TypeString,
Computed: true,
},
},
}
}
Expand Down
2 changes: 2 additions & 0 deletions aws/data_source_aws_security_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down Expand Up @@ -121,6 +122,7 @@ func testAccDataSourceAwsSecurityGroupConfig(rInt int) string {
Name = "tf-acctest"
Seed = "%d"
}
description = "sg description"
}
data "aws_security_group" "by_id" {
Expand Down

0 comments on commit c33cd2f

Please sign in to comment.