From 353959116e741b70b1ba94c655b7ecf2c2449ed5 Mon Sep 17 00:00:00 2001 From: tombuildsstuff Date: Thu, 5 Oct 2017 13:01:40 +0100 Subject: [PATCH] Upgrading the new container service test --- azurerm/resource_arm_container_group_test.go | 105 ++++++++++--------- 1 file changed, 53 insertions(+), 52 deletions(-) diff --git a/azurerm/resource_arm_container_group_test.go b/azurerm/resource_arm_container_group_test.go index 22d44251b8ac..3d5b99d68087 100644 --- a/azurerm/resource_arm_container_group_test.go +++ b/azurerm/resource_arm_container_group_test.go @@ -275,63 +275,64 @@ resource "azurerm_container_group" "test" { func testAccAzureRMContainerGroup_linuxComplete(ri int, location string) string { return fmt.Sprintf(` - resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" - location = "%s" - } - - resource "azurerm_storage_account" "test" { - name = "accsa%d" - resource_group_name = "${azurerm_resource_group.test.name}" - location = "${azurerm_resource_group.test.location}" - account_type = "Standard_LRS" - } +resource "azurerm_resource_group" "test" { + name = "acctestRG-%d" + location = "%s" +} + +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" +} - resource "azurerm_storage_share" "test" { - name = "acctestss-%d" +resource "azurerm_storage_share" "test" { + name = "acctestss-%d" + + resource_group_name = "${azurerm_resource_group.test.name}" + storage_account_name = "${azurerm_storage_account.test.name}" + + quota = 50 +} - resource_group_name = "${azurerm_resource_group.test.name}" +resource "azurerm_container_group" "test" { + name = "acctestcontainergroup-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + ip_address_type = "public" + os_type = "linux" + + container { + name = "hf" + image = "seanmckenna/aci-hellofiles" + cpu = "1" + memory = "1.5" + port = "80" + protocol = "TCP" + + volume { + name = "logs" + mount_path = "/aci/logs" + read_only = false + share_name = "${azurerm_storage_share.test.name}" storage_account_name = "${azurerm_storage_account.test.name}" - - quota = 50 + storage_account_key = "${azurerm_storage_account.test.primary_access_key}" + } + + environment_variables { + "foo" = "bar" + "foo1" = "bar1" + } + + command = "/bin/bash -c ls" } - - resource "azurerm_container_group" "test" { - name = "acctestcontainergroup-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - ip_address_type = "public" - os_type = "linux" - - container { - name = "hf" - image = "seanmckenna/aci-hellofiles" - cpu = "1" - memory = "1.5" - port = "80" - protocol = "TCP" - - volume { - name = "logs" - mount_path = "/aci/logs" - read_only = false - share_name = "${azurerm_storage_share.test.name}" - storage_account_name = "${azurerm_storage_account.test.name}" - storage_account_key = "${azurerm_storage_account.test.primary_access_key}" - } - - environment_variables { - "foo" = "bar" - "foo1" = "bar1" - } - - command = "/bin/bash -c ls" - } - - tags { - environment = "Testing" - } + + tags { + environment = "Testing" } +} `, ri, location, ri, ri, ri) }