Skip to content

Commit

Permalink
Leaving the Data Source as a List
Browse files Browse the repository at this point in the history
  • Loading branch information
tombuildsstuff committed Jan 7, 2019
1 parent 05dd50e commit 4a60579
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
7 changes: 4 additions & 3 deletions azurerm/data_source_app_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func dataSourceArmAppService() *schema.Resource {
},

"connection_string": {
Type: schema.TypeSet,
Type: schema.TypeList,
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
Expand All @@ -60,8 +60,9 @@ func dataSourceArmAppService() *schema.Resource {
Computed: true,
},
"value": {
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Sensitive: true,
Computed: true,
},
"type": {
Type: schema.TypeString,
Expand Down
12 changes: 6 additions & 6 deletions azurerm/data_source_app_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,12 @@ func TestAccDataSourceAzureRMAppService_connectionString(t *testing.T) {
{
Config: testAccDataSourceAppService_connectionStrings(rInt, location),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr(dataSourceName, "connection_string.3173438943.name", "First"),
resource.TestCheckResourceAttr(dataSourceName, "connection_string.3173438943.value", "first-connection-string"),
resource.TestCheckResourceAttr(dataSourceName, "connection_string.3173438943.type", "Custom"),
resource.TestCheckResourceAttr(dataSourceName, "connection_string.2442860602.name", "Second"),
resource.TestCheckResourceAttr(dataSourceName, "connection_string.2442860602.value", "some-postgresql-connection-string"),
resource.TestCheckResourceAttr(dataSourceName, "connection_string.2442860602.type", "PostgreSQL"),
resource.TestCheckResourceAttr(dataSourceName, "connection_string.0.name", "First"),
resource.TestCheckResourceAttr(dataSourceName, "connection_string.0.value", "first-connection-string"),
resource.TestCheckResourceAttr(dataSourceName, "connection_string.0.type", "Custom"),
resource.TestCheckResourceAttr(dataSourceName, "connection_string.1.name", "Second"),
resource.TestCheckResourceAttr(dataSourceName, "connection_string.1.value", "some-postgresql-connection-string"),
resource.TestCheckResourceAttr(dataSourceName, "connection_string.1.type", "PostgreSQL"),
),
},
},
Expand Down

0 comments on commit 4a60579

Please sign in to comment.