Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
kosinsky committed Mar 17, 2020
1 parent 5525a83 commit b230942
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
10 changes: 3 additions & 7 deletions azurerm/helpers/azure/hdinsight.go
Expand Up @@ -150,14 +150,13 @@ func ExpandHDInsightsConfigurations(input []interface{}) map[string]interface{}
username := vs["username"].(string)
password := vs["password"].(string)

config := map[string]interface{}{
return map[string]interface{}{
"gateway": map[string]interface{}{
"restAuthCredential.isEnabled": enabled,
"restAuthCredential.username": username,
"restAuthCredential.password": password,
},
}
return config
}

func ExpandHDInsightsMetastore(input []interface{}) map[string]interface{} {
Expand All @@ -184,7 +183,6 @@ func ExpandHDInsightsMetastore(input []interface{}) map[string]interface{} {
"hive_hostname": server,
},
}

}

func FlattenHDInsightsConfigurations(input map[string]*string) []interface{} {
Expand Down Expand Up @@ -216,7 +214,6 @@ func FlattenHDInsightsConfigurations(input map[string]*string) []interface{} {
}

func FlattenHDInsightsHiveMetastore(env map[string]*string, site map[string]*string) []interface{} {

server := ""
if v, exists := env["hive_hostname"]; exists && v != nil {
server = *v
Expand All @@ -238,7 +235,6 @@ func FlattenHDInsightsHiveMetastore(env map[string]*string, site map[string]*str
}

if server != "" && database != "" {

return []interface{}{
map[string]interface{}{
"server": server,
Expand All @@ -247,9 +243,9 @@ func FlattenHDInsightsHiveMetastore(env map[string]*string, site map[string]*str
"password": password,
},
}
} else {
return nil
}

return nil
}

func SchemaHDInsightsStorageAccounts() *schema.Schema {
Expand Down
Expand Up @@ -1007,13 +1007,13 @@ func testAccAzureRMHDInsightHadoopCluster_metastore(data acceptance.TestData) st
return fmt.Sprintf(`
%s
resource "azurerm_sql_server" "test"{
name = "acctestsql-%d"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
administrator_login = "sql_admin"
administrator_login_password = "TerrAform123!"
version = "12.0"
resource "azurerm_sql_server" "test" {
name = "acctestsql-%d"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
administrator_login = "sql_admin"
administrator_login_password = "TerrAform123!"
version = "12.0"
}
resource "azurerm_sql_database" "test" {
Expand Down Expand Up @@ -1079,7 +1079,7 @@ resource "azurerm_hdinsight_hadoop_cluster" "test" {
}
hive_metastore {
server = azurerm_sql_server.test.fully_qualified_domain_name
server = azurerm_sql_server.test.fully_qualified_domain_name
database_name = azurerm_sql_database.test.name
username = azurerm_sql_server.test.administrator_login
password = azurerm_sql_server.test.administrator_login_password
Expand Down

0 comments on commit b230942

Please sign in to comment.