Skip to content

Commit

Permalink
Merge pull request #4729 from terraform-providers/tf-fmt
Browse files Browse the repository at this point in the history
run terraform fmt on all acceptance test terraform configurations
  • Loading branch information
tombuildsstuff authored Oct 26, 2019
2 parents e3ac0fe + 9131d35 commit 95296c5
Show file tree
Hide file tree
Showing 84 changed files with 1,489 additions and 1,413 deletions.
2 changes: 1 addition & 1 deletion azurerm/data_source_arm_data_factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func TestAccAzureRMDataFactoryDataSource_basic(t *testing.T) {
func testAccAzureRMDataFactoryDataSource_basic(rInt int, location string) string {
config := testAccAzureRMDataFactory_basic(rInt, location)
return fmt.Sprintf(`
%s
%s
data "azurerm_data_factory" "test" {
name = "${azurerm_data_factory.test.name}"
Expand Down
70 changes: 35 additions & 35 deletions azurerm/data_source_batch_account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,54 +145,54 @@ data "azurerm_batch_account" "test" {
func testAccDataSourceAzureBatchAccount_userSubscription(rInt int, rString string, location string, tenantID string, subscriptionID string) string {
return fmt.Sprintf(`
data "azurerm_azuread_service_principal" "test" {
display_name = "Microsoft Azure Batch"
display_name = "Microsoft Azure Batch"
}
resource "azurerm_resource_group" "test" {
name = "testaccRG-%d-batchaccount"
location = "%s"
name = "testaccRG-%d-batchaccount"
location = "%s"
}
resource "azurerm_key_vault" "test" {
name = "batchkv%s"
location = "${azurerm_resource_group.test.location}"
resource_group_name = "${azurerm_resource_group.test.name}"
enabled_for_disk_encryption = true
enabled_for_deployment = true
enabled_for_template_deployment = true
tenant_id = "%s"
sku {
name = "standard"
}
access_policy {
tenant_id = "%s"
object_id = "${data.azurerm_azuread_service_principal.test.object_id}"
secret_permissions = [
"get",
"list",
"set",
"delete"
]
}
name = "batchkv%s"
location = "${azurerm_resource_group.test.location}"
resource_group_name = "${azurerm_resource_group.test.name}"
enabled_for_disk_encryption = true
enabled_for_deployment = true
enabled_for_template_deployment = true
tenant_id = "%s"
sku {
name = "standard"
}
access_policy {
tenant_id = "%s"
object_id = "${data.azurerm_azuread_service_principal.test.object_id}"
secret_permissions = [
"get",
"list",
"set",
"delete"
]
}
}
resource "azurerm_role_assignment" "contribrole" {
scope = "/subscriptions/%s"
role_definition_name = "Contributor"
principal_id = "${data.azurerm_azuread_service_principal.test.object_id}"
scope = "/subscriptions/%s"
role_definition_name = "Contributor"
principal_id = "${data.azurerm_azuread_service_principal.test.object_id}"
}
resource "azurerm_batch_account" "test" {
name = "testaccbatch%s"
resource_group_name = "${azurerm_resource_group.test.name}"
location = "${azurerm_resource_group.test.location}"
name = "testaccbatch%s"
resource_group_name = "${azurerm_resource_group.test.name}"
location = "${azurerm_resource_group.test.location}"
pool_allocation_mode = "UserSubscription"
key_vault_reference {
id = "${azurerm_key_vault.test.id}"
url = "${azurerm_key_vault.test.vault_uri}"
Expand Down
2 changes: 1 addition & 1 deletion azurerm/data_source_batch_pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ resource "azurerm_batch_pool" "test" {
container_configuration {
type = "DockerCompatible"
container_registries= [
container_registries = [
{
registry_server = "myContainerRegistry.azurecr.io"
user_name = "myUserName"
Expand Down
32 changes: 16 additions & 16 deletions azurerm/data_source_dev_test_virtual_network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,31 +48,31 @@ func TestAccDataSourceArmDevTestVirtualNetwork_basic(t *testing.T) {
func testAccDataSourceArmDevTestVirtualNetwork_basic(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_dev_test_lab" "test" {
name = "acctestdtl%d"
location = "${azurerm_resource_group.test.location}"
resource_group_name = "${azurerm_resource_group.test.name}"
name = "acctestdtl%d"
location = "${azurerm_resource_group.test.location}"
resource_group_name = "${azurerm_resource_group.test.name}"
}
resource "azurerm_dev_test_virtual_network" "test" {
name = "acctestdtvn%d"
lab_name = "${azurerm_dev_test_lab.test.name}"
resource_group_name = "${azurerm_resource_group.test.name}"
subnet {
use_public_ip_address = "Allow"
use_in_virtual_machine_creation = "Allow"
}
name = "acctestdtvn%d"
lab_name = "${azurerm_dev_test_lab.test.name}"
resource_group_name = "${azurerm_resource_group.test.name}"
subnet {
use_public_ip_address = "Allow"
use_in_virtual_machine_creation = "Allow"
}
}
data "azurerm_dev_test_virtual_network" "test" {
name = "${azurerm_dev_test_virtual_network.test.name}"
lab_name = "${azurerm_dev_test_lab.test.name}"
resource_group_name = "${azurerm_resource_group.test.name}"
name = "${azurerm_dev_test_virtual_network.test.name}"
lab_name = "${azurerm_dev_test_lab.test.name}"
resource_group_name = "${azurerm_resource_group.test.name}"
}
Expand Down
10 changes: 5 additions & 5 deletions azurerm/data_source_express_route_circuit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ func testAccDataSourceAzureRMExpressRoute_basic(rInt int, location string) strin
config := testAccAzureRMExpressRouteCircuit_basicMeteredConfig(rInt, location)

return fmt.Sprintf(`
%s
%s
data "azurerm_express_route_circuit" test {
resource_group_name = "${azurerm_resource_group.test.name}"
name = "${azurerm_express_route_circuit.test.name}"
}
data "azurerm_express_route_circuit" test {
resource_group_name = "${azurerm_resource_group.test.name}"
name = "${azurerm_express_route_circuit.test.name}"
}
`, config)
}
82 changes: 41 additions & 41 deletions azurerm/data_source_mssql_elasticpool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,45 +39,45 @@ func TestAccDataSourceAzureRMMsSqlElasticPool_basic(t *testing.T) {

func testAccDataSourceAzureRMMsSqlElasticPool_basic(rInt int, location string) string {
return fmt.Sprintf(`
resource "azurerm_resource_group" "test" {
name = "acctestRG-%[1]d"
location = "%s"
}
resource "azurerm_sql_server" "test" {
name = "acctest%[1]d"
resource_group_name = "${azurerm_resource_group.test.name}"
location = "${azurerm_resource_group.test.location}"
version = "12.0"
administrator_login = "4dm1n157r470r"
administrator_login_password = "4-v3ry-53cr37-p455w0rd"
}
resource "azurerm_mssql_elasticpool" "test" {
name = "acctest-pool-dtu-%[1]d"
resource_group_name = "${azurerm_resource_group.test.name}"
location = "${azurerm_resource_group.test.location}"
server_name = "${azurerm_sql_server.test.name}"
max_size_gb = 50
zone_redundant = false
sku {
name = "GP_Gen5"
tier = "GeneralPurpose"
capacity = 4
family = "Gen5"
}
per_database_settings {
min_capacity = 0
max_capacity = 4
}
}
data "azurerm_mssql_elasticpool" "test" {
name = "${azurerm_mssql_elasticpool.test.name}"
resource_group_name = "${azurerm_resource_group.test.name}"
server_name = "${azurerm_sql_server.test.name}"
}
`, rInt, location)
resource "azurerm_resource_group" "test" {
name = "acctestRG-%[1]d"
location = "%s"
}
resource "azurerm_sql_server" "test" {
name = "acctest%[1]d"
resource_group_name = "${azurerm_resource_group.test.name}"
location = "${azurerm_resource_group.test.location}"
version = "12.0"
administrator_login = "4dm1n157r470r"
administrator_login_password = "4-v3ry-53cr37-p455w0rd"
}
resource "azurerm_mssql_elasticpool" "test" {
name = "acctest-pool-dtu-%[1]d"
resource_group_name = "${azurerm_resource_group.test.name}"
location = "${azurerm_resource_group.test.location}"
server_name = "${azurerm_sql_server.test.name}"
max_size_gb = 50
zone_redundant = false
sku {
name = "GP_Gen5"
tier = "GeneralPurpose"
capacity = 4
family = "Gen5"
}
per_database_settings {
min_capacity = 0
max_capacity = 4
}
}
data "azurerm_mssql_elasticpool" "test" {
name = "${azurerm_mssql_elasticpool.test.name}"
resource_group_name = "${azurerm_resource_group.test.name}"
server_name = "${azurerm_sql_server.test.name}"
}
`, rInt, location)
}
2 changes: 1 addition & 1 deletion azurerm/data_source_network_ddos_protection_plan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func testAccAzureRMNetworkDDoSProtectionPlanDataSource_basic(t *testing.T) {

func testAccAzureRMNetworkDDoSProtectionPlanDataSource_basicConfig(rInt int, location string) string {
return fmt.Sprintf(`
%s
%s
data "azurerm_network_ddos_protection_plan" "test" {
name = "${azurerm_network_ddos_protection_plan.test.name}"
Expand Down
16 changes: 8 additions & 8 deletions azurerm/data_source_resources_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func testAccDataSourceAzureRMResources_ByName(rInt int, rString string, location
%s
data "azurerm_resources" "test" {
name = "${azurerm_storage_account.test.name}"
name = "${azurerm_storage_account.test.name}"
}
`, r)
}
Expand All @@ -129,8 +129,8 @@ func testAccDataSourceAzureRMResources_ByResourceType(rInt int, rString string,
%s
data "azurerm_resources" "test" {
resource_group_name = "${azurerm_storage_account.test.resource_group_name}"
type = "Microsoft.Storage/storageAccounts"
resource_group_name = "${azurerm_storage_account.test.resource_group_name}"
type = "Microsoft.Storage/storageAccounts"
}
`, r)
}
Expand All @@ -142,11 +142,11 @@ func testAccDataSourceAzureRMResources_FilteredByTags(rInt int, rString string,
data "azurerm_resources" "test" {
name = "${azurerm_storage_account.test.name}"
resource_group_name = "${azurerm_storage_account.test.resource_group_name}"
required_tags = {
environment = "production"
}
resource_group_name = "${azurerm_storage_account.test.resource_group_name}"
required_tags = {
environment = "production"
}
}
`, r)
}
18 changes: 9 additions & 9 deletions azurerm/data_source_sql_database_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ func testAccDataSourceAzureRMSqlDatabase_basic(rInt int, location string) string
%s
data "azurerm_sql_database" "test" {
name = "${azurerm_sql_database.test.name}"
server_name = "${azurerm_sql_database.test.server_name}"
resource_group_name = "${azurerm_resource_group.test.name}"
name = "${azurerm_sql_database.test.name}"
server_name = "${azurerm_sql_database.test.server_name}"
resource_group_name = "${azurerm_resource_group.test.name}"
}
`, template)
}
Expand All @@ -105,9 +105,9 @@ func testAccDataSourceAzureRMSqlDatabase_elasticPool(rInt int, location string)
%s
data "azurerm_sql_database" "test" {
name = "${azurerm_sql_database.test.name}"
server_name = "${azurerm_sql_database.test.server_name}"
resource_group_name = "${azurerm_resource_group.test.name}"
name = "${azurerm_sql_database.test.name}"
server_name = "${azurerm_sql_database.test.server_name}"
resource_group_name = "${azurerm_resource_group.test.name}"
}
`, template)
}
Expand All @@ -118,9 +118,9 @@ func testAccDataSourceAzureRMSqlDatabase_readScale(rInt int, location string, re
%s
data "azurerm_sql_database" "test" {
name = "${azurerm_sql_database.test.name}"
server_name = "${azurerm_sql_database.test.server_name}"
resource_group_name = "${azurerm_resource_group.test.name}"
name = "${azurerm_sql_database.test.name}"
server_name = "${azurerm_sql_database.test.server_name}"
resource_group_name = "${azurerm_resource_group.test.name}"
}
`, template)
}
30 changes: 15 additions & 15 deletions azurerm/data_source_storage_management_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,24 +64,24 @@ resource "azurerm_storage_account" "testsa" {
resource "azurerm_storage_management_policy" "testpolicy" {
storage_account_id = "${azurerm_storage_account.testsa.id}"
rule {
name = "rule1"
enabled = true
filters {
prefix_match = [ "container1/prefix1" ]
blob_types = [ "blockBlob" ]
}
actions {
name = "rule1"
enabled = true
filters {
prefix_match = ["container1/prefix1"]
blob_types = ["blockBlob"]
}
actions {
base_blob {
tier_to_cool_after_days_since_modification_greater_than = 10
tier_to_archive_after_days_since_modification_greater_than = 50
delete_after_days_since_modification_greater_than = 100
}
snapshot {
delete_after_days_since_creation_greater_than = 30
}
}
tier_to_archive_after_days_since_modification_greater_than = 50
delete_after_days_since_modification_greater_than = 100
}
snapshot {
delete_after_days_since_creation_greater_than = 30
}
}
}
}
Expand Down
Loading

0 comments on commit 95296c5

Please sign in to comment.