Skip to content

Commit

Permalink
Merge pull request #1 from DenheenJ/update-fields
Browse files Browse the repository at this point in the history
add _id to fields for clarity
  • Loading branch information
DenheenJ authored Dec 19, 2018
2 parents f89131e + fd61fc7 commit f488e6c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions azurerm/resource_arm_service_fabric_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@ func resourceArmServiceFabricCluster() *schema.Resource {
Required: true,
ForceNew: true,
},
"cluster_application": {
"cluster_application_id": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
},
"client_application": {
"client_application_id": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Expand Down Expand Up @@ -551,8 +551,8 @@ func expandServiceFabricClusterAzureActiveDirectory(input []interface{}) *servic
v := input[0].(map[string]interface{})

tenantId := v["tenant_id"].(string)
clusterApplication := v["cluster_application"].(string)
clientApplication := v["client_application"].(string)
clusterApplication := v["cluster_application_id"].(string)
clientApplication := v["client_application_id"].(string)

config := servicefabric.AzureActiveDirectory{
TenantID: utils.String(tenantId),
Expand All @@ -573,11 +573,11 @@ func flattenServiceFabricClusterAzureActiveDirectory(input *servicefabric.AzureA
}

if name := v.ClusterApplication; name != nil {
output["cluster_application"] = *name
output["cluster_application_id"] = *name
}

if endpoint := v.ClientApplication; endpoint != nil {
output["client_application"] = *endpoint
output["client_application_id"] = *endpoint
}

results = append(results, output)
Expand Down
10 changes: 5 additions & 5 deletions azurerm/resource_arm_service_fabric_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ func TestAccAzureRMServiceFabricCluster_azureActiveDirectory(t *testing.T) {
testCheckAzureRMServiceFabricClusterExists(resourceName),
resource.TestCheckResourceAttr(resourceName, "azure_active_directory.#", "1"),
resource.TestCheckResourceAttr(resourceName, "azure_active_directory.tenant_id", "00000000-0000-0000-0000-00000000000"),
resource.TestCheckResourceAttr(resourceName, "azure_active_directory.cluster_application", "00000000-0000-0000-0000-000000000000"),
resource.TestCheckResourceAttr(resourceName, "azure_active_directory.client_application", "00000000-0000-0000-0000-000000000000"),
resource.TestCheckResourceAttr(resourceName, "azure_active_directory.cluster_application_id", "00000000-0000-0000-0000-000000000000"),
resource.TestCheckResourceAttr(resourceName, "azure_active_directory.client_application_id", "00000000-0000-0000-0000-000000000000"),
resource.TestCheckResourceAttr(resourceName, "fabric_settings.0.name", "Security"),
resource.TestCheckResourceAttr(resourceName, "fabric_settings.0.parameters.ClusterProtectionLevel", "EncryptAndSign"),
resource.TestCheckResourceAttr(resourceName, "management_endpoint", "https://example:80"),
Expand Down Expand Up @@ -771,9 +771,9 @@ resource "azurerm_service_fabric_cluster" "test" {
management_endpoint = "https://example:80"
azure_active_directory {
tenant_id = "00000000-0000-0000-0000-000000000000"
cluster_application = "00000000-0000-0000-0000-000000000000"
client_application = "00000000-0000-0000-0000-000000000000"
tenant_id = "00000000-0000-0000-0000-000000000000"
cluster_application_id = "00000000-0000-0000-0000-000000000000"
client_application_id = "00000000-0000-0000-0000-000000000000"
}
fabric_settings {
Expand Down
4 changes: 2 additions & 2 deletions website/docs/r/service_fabric_cluster.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ A `azure_active_directory` block supports the following:

* `tenant_id` - (Required) The TenantID of the Azure Active Directory resource.

* `cluster_application` - (Required) The GUID of the cluster application.
* `cluster_application_id` - (Required) The GUID of the cluster application.

* `client_application` - (Required) The GUID of the client application.
* `client_application_id` - (Required) The GUID of the client application.

---

Expand Down

0 comments on commit f488e6c

Please sign in to comment.