From 7c6eb8c1aa6f4593020304f55a2fa56bed43190a Mon Sep 17 00:00:00 2001 From: tombuildsstuff Date: Tue, 6 Nov 2018 12:40:37 +0000 Subject: [PATCH] fixing the spacing --- ...urce_arm_virtual_machine_scale_set_test.go | 17 +-- azurerm/resource_arm_virtual_machine_test.go | 143 +++++++++--------- 2 files changed, 79 insertions(+), 81 deletions(-) diff --git a/azurerm/resource_arm_virtual_machine_scale_set_test.go b/azurerm/resource_arm_virtual_machine_scale_set_test.go index 064d6e230d29..9548152d9243 100644 --- a/azurerm/resource_arm_virtual_machine_scale_set_test.go +++ b/azurerm/resource_arm_virtual_machine_scale_set_test.go @@ -661,7 +661,7 @@ func TestAccAzureRMVirtualMachineScaleSet_UserAssignedMSI(t *testing.T) { }) } -func TestAccAzureRMVirtualMachineScaleSet_MultipleAssignedMSI(t *testing.T) { +func TestAccAzureRMVirtualMachineScaleSet_multipleAssignedMSI(t *testing.T) { resourceName := "azurerm_virtual_machine_scale_set.test" ri := acctest.RandInt() rs := acctest.RandString(14) @@ -4880,10 +4880,9 @@ resource "azurerm_storage_container" "test" { } resource "azurerm_user_assigned_identity" "test" { - resource_group_name = "${azurerm_resource_group.test.name}" - location = "${azurerm_resource_group.test.location}" - - name = "acctest%[3]s" + name = "acctest%[3]s" + resource_group_name = "${azurerm_resource_group.test.name}" + location = "${azurerm_resource_group.test.location}" } resource "azurerm_virtual_machine_scale_set" "test" { @@ -4899,10 +4898,10 @@ resource "azurerm_virtual_machine_scale_set" "test" { capacity = 1 } - identity { - type = "SystemAssigned, UserAssigned" - identity_ids = ["${azurerm_user_assigned_identity.test.id}"] - } + identity { + type = "SystemAssigned, UserAssigned" + identity_ids = ["${azurerm_user_assigned_identity.test.id}"] + } os_profile { computer_name_prefix = "testvm-%[1]d" diff --git a/azurerm/resource_arm_virtual_machine_test.go b/azurerm/resource_arm_virtual_machine_test.go index b46bc85ca6d9..0a669a5e39ce 100644 --- a/azurerm/resource_arm_virtual_machine_test.go +++ b/azurerm/resource_arm_virtual_machine_test.go @@ -80,7 +80,7 @@ func TestAccAzureRMVirtualMachine_UserAssignedIdentity(t *testing.T) { }) } -func TestAccAzureRMVirtualMachine_MultipleAssignedIdentity(t *testing.T) { +func TestAccAzureRMVirtualMachine_multipleAssignedIdentity(t *testing.T) { var vm compute.VirtualMachine resourceName := "azurerm_virtual_machine.test" ri := acctest.RandInt() @@ -449,103 +449,102 @@ resource "azurerm_virtual_machine" "test" { func testAccAzureRMVirtualMachineMultipleAssignedIdentity(rInt int, location string, rString string) string { return fmt.Sprintf(` resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" + name = "acctestRG-%d" + location = "%s" } resource "azurerm_virtual_network" "test" { - name = "acctvn-%d" - address_space = ["10.0.0.0/16"] - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" + name = "acctvn-%d" + address_space = ["10.0.0.0/16"] + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" } resource "azurerm_subnet" "test" { - name = "acctsub-%d" - resource_group_name = "${azurerm_resource_group.test.name}" - virtual_network_name = "${azurerm_virtual_network.test.name}" - address_prefix = "10.0.2.0/24" + name = "acctsub-%d" + resource_group_name = "${azurerm_resource_group.test.name}" + virtual_network_name = "${azurerm_virtual_network.test.name}" + address_prefix = "10.0.2.0/24" } resource "azurerm_network_interface" "test" { - name = "acctni-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - - ip_configuration { - name = "testconfiguration1" - subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" - } + name = "acctni-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + + ip_configuration { + name = "testconfiguration1" + subnet_id = "${azurerm_subnet.test.id}" + private_ip_address_allocation = "dynamic" + } } resource "azurerm_storage_account" "test" { - name = "accsa%d" - resource_group_name = "${azurerm_resource_group.test.name}" - location = "${azurerm_resource_group.test.location}" - account_tier = "Standard" - account_replication_type = "LRS" - - tags { - environment = "staging" - } + name = "accsa%d" + resource_group_name = "${azurerm_resource_group.test.name}" + location = "${azurerm_resource_group.test.location}" + account_tier = "Standard" + account_replication_type = "LRS" + + tags { + environment = "staging" + } } resource "azurerm_storage_container" "test" { - name = "vhds" - resource_group_name = "${azurerm_resource_group.test.name}" - storage_account_name = "${azurerm_storage_account.test.name}" - container_access_type = "private" + name = "vhds" + resource_group_name = "${azurerm_resource_group.test.name}" + storage_account_name = "${azurerm_storage_account.test.name}" + container_access_type = "private" } resource "azurerm_user_assigned_identity" "test" { - resource_group_name = "${azurerm_resource_group.test.name}" - location = "${azurerm_resource_group.test.location}" - - name = "acctest%s" + name = "acctest%s" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" } resource "azurerm_virtual_machine" "test" { - name = "acctvm-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - network_interface_ids = ["${azurerm_network_interface.test.id}"] - vm_size = "Standard_D1_v2" - - storage_image_reference { - publisher = "Canonical" - offer = "UbuntuServer" - sku = "16.04-LTS" - version = "latest" - } + name = "acctvm-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + network_interface_ids = ["${azurerm_network_interface.test.id}"] + vm_size = "Standard_D1_v2" - storage_os_disk { - name = "myosdisk1" - vhd_uri = "${azurerm_storage_account.test.primary_blob_endpoint}${azurerm_storage_container.test.name}/myosdisk1.vhd" - caching = "ReadWrite" - create_option = "FromImage" - disk_size_gb = "45" - } + storage_image_reference { + publisher = "Canonical" + offer = "UbuntuServer" + sku = "16.04-LTS" + version = "latest" + } - os_profile { - computer_name = "hn%d" - admin_username = "testadmin" - admin_password = "Password1234!" - } + storage_os_disk { + name = "myosdisk1" + vhd_uri = "${azurerm_storage_account.test.primary_blob_endpoint}${azurerm_storage_container.test.name}/myosdisk1.vhd" + caching = "ReadWrite" + create_option = "FromImage" + disk_size_gb = "45" + } - os_profile_linux_config { - disable_password_authentication = false - } + os_profile { + computer_name = "hn%d" + admin_username = "testadmin" + admin_password = "Password1234!" + } - tags { - environment = "Production" - cost-center = "Ops" - } + os_profile_linux_config { + disable_password_authentication = false + } - identity { - type = "SystemAssigned, UserAssigned" - identity_ids = ["${azurerm_user_assigned_identity.test.id}"] - } + identity { + type = "SystemAssigned, UserAssigned" + identity_ids = ["${azurerm_user_assigned_identity.test.id}"] + } + + tags { + environment = "Production" + cost-center = "Ops" + } } `, rInt, location, rInt, rInt, rInt, rInt, rString, rInt, rInt) }