Skip to content

Commit

Permalink
run terrafmt on acctests and website (#3742)
Browse files Browse the repository at this point in the history
  • Loading branch information
katbyte authored Jun 27, 2019
1 parent c0ef22f commit 3b0cbe6
Show file tree
Hide file tree
Showing 152 changed files with 1,557 additions and 1,428 deletions.
1 change: 0 additions & 1 deletion azurerm/data_source_api_management_product_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ resource "azurerm_api_management" "test" {
resource_group_name = "${azurerm_resource_group.test.name}"
}
resource "azurerm_api_management_product" "test" {
product_id = "test-product"
api_management_name = "${azurerm_api_management.test.name}"
Expand Down
17 changes: 8 additions & 9 deletions azurerm/data_source_api_management_user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,15 @@ resource "azurerm_api_management" "test" {
resource_group_name = "${azurerm_resource_group.test.name}"
}
resource "azurerm_api_management_user" "test" {
user_id = "test-user"
api_management_name = "${azurerm_api_management.test.name}"
resource_group_name = "${azurerm_resource_group.test.name}"
first_name = "Acceptance"
last_name = "Test"
email = "azure-acctest%[email protected]"
state = "active"
note = "Used for testing in dimension C-137."
user_id = "test-user"
api_management_name = "${azurerm_api_management.test.name}"
resource_group_name = "${azurerm_resource_group.test.name}"
first_name = "Acceptance"
last_name = "Test"
email = "azure-acctest%[email protected]"
state = "active"
note = "Used for testing in dimension C-137."
}
data "azurerm_api_management_user" "test" {
Expand Down
26 changes: 13 additions & 13 deletions azurerm/data_source_app_service_plan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,26 +204,26 @@ data "azurerm_app_service_plan" "test" {
func testAccDataSourceAppServicePlan_basicWindowsContainer(rInt int, location string) string {
return fmt.Sprintf(`
resource "azurerm_resource_group" "test" {
name = "acctestRG-%d"
location = "%s"
name = "acctestRG-%d"
location = "%s"
}
resource "azurerm_app_service_plan" "test" {
name = "acctestASP-%d"
location = "${azurerm_resource_group.test.location}"
resource_group_name = "${azurerm_resource_group.test.name}"
is_xenon = true
kind = "xenon"
name = "acctestASP-%d"
location = "${azurerm_resource_group.test.location}"
resource_group_name = "${azurerm_resource_group.test.name}"
is_xenon = true
kind = "xenon"
sku {
tier = "PremiumContainer"
size = "PC2"
}
sku {
tier = "PremiumContainer"
size = "PC2"
}
}
data "azurerm_app_service_plan" "test" {
name = "${azurerm_app_service_plan.test.name}"
resource_group_name = "${azurerm_app_service_plan.test.resource_group_name}"
name = "${azurerm_app_service_plan.test.name}"
resource_group_name = "${azurerm_app_service_plan.test.resource_group_name}"
}
`, rInt, location, rInt)
}
20 changes: 10 additions & 10 deletions azurerm/data_source_application_insights_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ func TestAccDataSourceApplicationInsights_basic(t *testing.T) {
func testAccResourceApplicationInsights_complete(rInt int, location string) string {
return fmt.Sprintf(`
resource "azurerm_resource_group" "test" {
name = "acctestRG-%[1]d"
location = "%[2]s"
name = "acctestRG-%[1]d"
location = "%[2]s"
}
resource "azurerm_application_insights" "test" {
name = "acctestappinsights-%[1]d"
location = "${azurerm_resource_group.test.location}"
resource_group_name = "${azurerm_resource_group.test.name}"
application_type = "other"
tags = {
"foo" = "bar"
}
name = "acctestappinsights-%[1]d"
location = "${azurerm_resource_group.test.location}"
resource_group_name = "${azurerm_resource_group.test.name}"
application_type = "other"
tags = {
"foo" = "bar"
}
}
data "azurerm_application_insights" "test" {
Expand Down
10 changes: 5 additions & 5 deletions azurerm/data_source_availability_set_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,18 @@ func TestAccDataSourceAvailabilitySet_basic(t *testing.T) {
func testAccDataSourceAvailabilitySet_basic(rInt int, location string) string {
return fmt.Sprintf(`
resource "azurerm_resource_group" "test" {
name = "acctestRG-%[1]d"
location = "%[2]s"
name = "acctestRG-%[1]d"
location = "%[2]s"
}
resource "azurerm_availability_set" "test" {
name = "acctestavset-%[1]d"
location = "${azurerm_resource_group.test.location}"
resource_group_name = "${azurerm_resource_group.test.name}"
tags = {
"foo" = "bar"
}
tags = {
"foo" = "bar"
}
}
data "azurerm_availability_set" "test" {
Expand Down
21 changes: 10 additions & 11 deletions azurerm/data_source_batch_certificate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,19 @@ resource "azurerm_batch_account" "test" {
}
resource "azurerm_batch_certificate" "test" {
resource_group_name = "${azurerm_resource_group.test.name}"
account_name = "${azurerm_batch_account.test.name}"
certificate = "${filebase64("testdata/batch_certificate.pfx")}"
format = "Pfx"
password = "terraform"
thumbprint = "42C107874FD0E4A9583292A2F1098E8FE4B2EDDA"
thumbprint_algorithm = "SHA1"
resource_group_name = "${azurerm_resource_group.test.name}"
account_name = "${azurerm_batch_account.test.name}"
certificate = "${filebase64("testdata/batch_certificate.pfx")}"
format = "Pfx"
password = "terraform"
thumbprint = "42C107874FD0E4A9583292A2F1098E8FE4B2EDDA"
thumbprint_algorithm = "SHA1"
}
data "azurerm_batch_certificate" "test" {
name = "${azurerm_batch_certificate.test.name}"
account_name = "${azurerm_batch_account.test.name}"
resource_group_name = "${azurerm_resource_group.test.name}"
name = "${azurerm_batch_certificate.test.name}"
account_name = "${azurerm_batch_account.test.name}"
resource_group_name = "${azurerm_resource_group.test.name}"
}
`, rInt, location, rString)
}
32 changes: 16 additions & 16 deletions azurerm/data_source_batch_pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,23 +88,23 @@ resource "azurerm_batch_account" "test" {
}
resource "azurerm_batch_certificate" "test" {
resource_group_name = "${azurerm_resource_group.test.name}"
account_name = "${azurerm_batch_account.test.name}"
certificate = "${filebase64("testdata/batch_certificate.pfx")}"
format = "Pfx"
password = "terraform"
thumbprint = "42C107874FD0E4A9583292A2F1098E8FE4B2EDDA"
thumbprint_algorithm = "SHA1"
resource_group_name = "${azurerm_resource_group.test.name}"
account_name = "${azurerm_batch_account.test.name}"
certificate = "${filebase64("testdata/batch_certificate.pfx")}"
format = "Pfx"
password = "terraform"
thumbprint = "42C107874FD0E4A9583292A2F1098E8FE4B2EDDA"
thumbprint_algorithm = "SHA1"
}
resource "azurerm_batch_pool" "test" {
name = "testaccpool%s"
resource_group_name = "${azurerm_resource_group.test.name}"
account_name = "${azurerm_batch_account.test.name}"
display_name = "Test Acc Pool"
vm_size = "Standard_A1"
node_agent_sku_id = "batch.node.ubuntu 16.04"
max_tasks_per_node = 2
name = "testaccpool%s"
resource_group_name = "${azurerm_resource_group.test.name}"
account_name = "${azurerm_batch_account.test.name}"
display_name = "Test Acc Pool"
vm_size = "Standard_A1"
node_agent_sku_id = "batch.node.ubuntu 16.04"
max_tasks_per_node = 2
fixed_scale {
target_dedicated_nodes = 2
Expand All @@ -121,13 +121,13 @@ resource "azurerm_batch_pool" "test" {
certificate {
id = "${azurerm_batch_certificate.test.id}"
store_location = "CurrentUser"
visibility = [ "StartTask", "RemoteUser" ]
visibility = ["StartTask", "RemoteUser"]
}
container_configuration {
type = "DockerCompatible"
}
start_task {
command_line = "echo 'Hello World from $env'"
max_task_retry_count = 1
Expand Down
2 changes: 1 addition & 1 deletion azurerm/data_source_express_route_circuit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ func testAccDataSourceAzureRMExpressRoute_basic(rInt int, location string) strin
resource_group_name = "${azurerm_resource_group.test.name}"
name = "${azurerm_express_route_circuit.test.name}"
}
`, config)
`, config)
}
2 changes: 1 addition & 1 deletion azurerm/data_source_firewall_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ resource "azurerm_firewall" "test" {
}
data "azurerm_firewall" "test" {
name = "${azurerm_firewall.test.name}"
name = "${azurerm_firewall.test.name}"
resource_group_name = "${azurerm_resource_group.test.name}"
}
`, rInt, location, rInt, rInt, rInt)
Expand Down
6 changes: 2 additions & 4 deletions azurerm/data_source_policy_definition_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ data "azurerm_policy_definition" "test" {

func testAccDataSourceBuiltInPolicyDefinitionAtManagementGroup(name string) string {
return fmt.Sprintf(`
data "azurerm_client_config" "current" {}
data "azurerm_policy_definition" "test" {
Expand All @@ -97,7 +96,7 @@ resource "azurerm_policy_definition" "test_policy" {
mode = "All"
display_name = "acctestpol-%d"
policy_rule = <<POLICY_RULE
policy_rule = <<POLICY_RULE
{
"if": {
"not": {
Expand Down Expand Up @@ -132,9 +131,8 @@ METADATA
}
data "azurerm_policy_definition" "test" {
display_name = "${azurerm_policy_definition.test_policy.display_name}"
display_name = "${azurerm_policy_definition.test_policy.display_name}"
}
`, ri, ri)
}

Expand Down
5 changes: 2 additions & 3 deletions azurerm/data_source_redis_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ func testAccDataSourceAzureRMRedisCache_standardWithDataSource(rInt int, locatio
%s
data "azurerm_redis_cache" "test" {
name = "${azurerm_redis_cache.test.name}"
resource_group_name = "${azurerm_redis_cache.test.resource_group_name}"
name = "${azurerm_redis_cache.test.name}"
resource_group_name = "${azurerm_redis_cache.test.resource_group_name}"
}
`, config)
}
Loading

0 comments on commit 3b0cbe6

Please sign in to comment.