Skip to content

Commit

Permalink
Addressing review comments, including validation improvements and a b…
Browse files Browse the repository at this point in the history
…ugfix
  • Loading branch information
Daniel Intskirveli committed Nov 15, 2019
1 parent aab1ead commit 20e432c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
4 changes: 2 additions & 2 deletions azurerm/helpers/azure/hdinsight.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ func SchemaHDInsightsGen2StorageAccounts() *schema.Schema {
Type: schema.TypeString,
Required: true,
ForceNew: true,
ValidateFunc: validate.NoEmptyStrings,
ValidateFunc: ValidateResourceID,
},
"filesystem_id": {
Type: schema.TypeString,
Expand All @@ -203,7 +203,7 @@ func SchemaHDInsightsGen2StorageAccounts() *schema.Schema {
Type: schema.TypeString,
Required: true,
ForceNew: true,
ValidateFunc: validate.NoEmptyStrings,
ValidateFunc: ValidateResourceID,
},
"is_default": {
Type: schema.TypeBool,
Expand Down
3 changes: 1 addition & 2 deletions azurerm/resource_arm_hdinsight_ml_services_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,7 @@ func resourceArmHDInsightMLServicesClusterCreate(d *schema.ResourceData, meta in
gateway := expandHDInsightsMLServicesConfigurations(gatewayRaw, rStudio)

storageAccountsRaw := d.Get("storage_account").([]interface{})
storageAccountsGen2Raw := d.Get("storage_account_gen2").([]interface{})
storageAccounts, identity, err := azure.ExpandHDInsightsStorageAccounts(storageAccountsRaw, storageAccountsGen2Raw)
storageAccounts, identity, err := azure.ExpandHDInsightsStorageAccounts(storageAccountsRaw, nil)
if err != nil {
return fmt.Errorf("Error expanding `storage_account`: %s", err)
}
Expand Down
3 changes: 1 addition & 2 deletions azurerm/resource_arm_hdinsight_rserver_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,7 @@ func resourceArmHDInsightRServerClusterCreate(d *schema.ResourceData, meta inter
gateway := expandHDInsightsRServerConfigurations(gatewayRaw, rStudio)

storageAccountsRaw := d.Get("storage_account").([]interface{})
storageAccountsGen2Raw := d.Get("storage_account_gen2").([]interface{})
storageAccounts, identity, err := azure.ExpandHDInsightsStorageAccounts(storageAccountsRaw, storageAccountsGen2Raw)
storageAccounts, identity, err := azure.ExpandHDInsightsStorageAccounts(storageAccountsRaw, nil)
if err != nil {
return fmt.Errorf("Error expanding `storage_account`: %s", err)
}
Expand Down
5 changes: 1 addition & 4 deletions azurerm/resource_arm_hdinsight_storm_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ func resourceArmHDInsightStormCluster() *schema.Resource {

"storage_account": azure.SchemaHDInsightsStorageAccounts(),

"storage_account_gen2": azure.SchemaHDInsightsGen2StorageAccounts(),

"roles": {
Type: schema.TypeList,
Required: true,
Expand Down Expand Up @@ -139,8 +137,7 @@ func resourceArmHDInsightStormClusterCreate(d *schema.ResourceData, meta interfa
gateway := azure.ExpandHDInsightsConfigurations(gatewayRaw)

storageAccountsRaw := d.Get("storage_account").([]interface{})
storageAccountsGen2Raw := d.Get("storage_account_gen2").([]interface{})
storageAccounts, identity, err := azure.ExpandHDInsightsStorageAccounts(storageAccountsRaw, storageAccountsGen2Raw)
storageAccounts, identity, err := azure.ExpandHDInsightsStorageAccounts(storageAccountsRaw, nil)
if err != nil {
return fmt.Errorf("Error expanding `storage_account`: %s", err)
}
Expand Down

0 comments on commit 20e432c

Please sign in to comment.