diff --git a/azurerm/data_source_image_test.go b/azurerm/data_source_image_test.go index 8c2e4da2abd4..be69c5550f5e 100644 --- a/azurerm/data_source_image_test.go +++ b/azurerm/data_source_image_test.go @@ -87,11 +87,11 @@ resource "azurerm_subnet" "test" { } resource "azurerm_public_ip" "test" { - name = "acctestpip%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "Dynamic" - domain_name_label = "acctestpip%d" + name = "acctestpip%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Dynamic" + domain_name_label = "acctestpip%d" } resource "azurerm_network_interface" "testsource" { @@ -102,7 +102,7 @@ resource "azurerm_network_interface" "testsource" { ip_configuration { name = "testconfigurationsource" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" public_ip_address_id = "${azurerm_public_ip.test.id}" } } @@ -216,11 +216,11 @@ resource "azurerm_subnet" "test" { } resource "azurerm_public_ip" "test" { - name = "acctestpip%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "Dynamic" - domain_name_label = "acctestpip%d" + name = "acctestpip%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Dynamic" + domain_name_label = "acctestpip%d" } resource "azurerm_network_interface" "testsource" { @@ -231,7 +231,7 @@ resource "azurerm_network_interface" "testsource" { ip_configuration { name = "testconfigurationsource" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" public_ip_address_id = "${azurerm_public_ip.test.id}" } } diff --git a/azurerm/data_source_network_interface_test.go b/azurerm/data_source_network_interface_test.go index 8323475973a0..d47ad14be2a9 100644 --- a/azurerm/data_source_network_interface_test.go +++ b/azurerm/data_source_network_interface_test.go @@ -70,7 +70,7 @@ resource "azurerm_network_interface" "test" { ip_configuration { name = "testconfiguration1" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" } tags { @@ -116,7 +116,7 @@ resource "azurerm_network_interface" "test" { ip_configuration { name = "testconfiguration1" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" } tags { diff --git a/azurerm/data_source_public_ip.go b/azurerm/data_source_public_ip.go index 395ace5e0f8b..0f8c08534d3a 100644 --- a/azurerm/data_source_public_ip.go +++ b/azurerm/data_source_public_ip.go @@ -18,8 +18,20 @@ func dataSourceArmPublicIP() *schema.Resource { ValidateFunc: validate.NoEmptyStrings, }, + "location": locationForDataSourceSchema(), + "resource_group_name": resourceGroupNameForDataSourceSchema(), + "sku": { + Type: schema.TypeString, + Computed: true, + }, + + "allocation_method": { + Type: schema.TypeString, + Computed: true, + }, + "ip_version": { Type: schema.TypeString, Computed: true, @@ -40,11 +52,18 @@ func dataSourceArmPublicIP() *schema.Resource { Computed: true, }, + "reverse_fqdn": { + Type: schema.TypeString, + Computed: true, + }, + "ip_address": { Type: schema.TypeString, Computed: true, }, + "zones": zonesSchemaComputed(), + "tags": tagsSchema(), }, } @@ -67,19 +86,36 @@ func dataSourceArmPublicIPRead(d *schema.ResourceData, meta interface{}) error { d.SetId(*resp.ID) + d.Set("zones", resp.Zones) + //ensure values are at least set to "", d.Set() is a noop on a nil + //there must be a better way... + d.Set("location", "") + d.Set("sku", "") d.Set("fqdn", "") + d.Set("reverse_fqdn", "") d.Set("domain_name_label", "") + d.Set("allocation_method", "") d.Set("ip_address", "") d.Set("ip_version", "") d.Set("idle_timeout_in_minutes", 0) + if location := resp.Location; location != nil { + d.Set("location", azureRMNormalizeLocation(*location)) + } + + if sku := resp.Sku; sku != nil { + d.Set("sku", string(sku.Name)) + } + if props := resp.PublicIPAddressPropertiesFormat; props != nil { if dnsSettings := props.DNSSettings; dnsSettings != nil { d.Set("fqdn", dnsSettings.Fqdn) + d.Set("reverse_fqdn", dnsSettings.ReverseFqdn) d.Set("domain_name_label", dnsSettings.DomainNameLabel) } + d.Set("allocation_method", string(props.PublicIPAllocationMethod)) d.Set("ip_address", props.IPAddress) d.Set("ip_version", string(props.PublicIPAddressVersion)) d.Set("idle_timeout_in_minutes", props.IdleTimeoutInMinutes) diff --git a/azurerm/data_source_public_ip_test.go b/azurerm/data_source_public_ip_test.go index df92cb17ef18..44067fd0e987 100644 --- a/azurerm/data_source_public_ip_test.go +++ b/azurerm/data_source_public_ip_test.go @@ -75,12 +75,12 @@ resource "azurerm_resource_group" "test" { } resource "azurerm_public_ip" "test" { - name = "%s" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" - domain_name_label = "acctest-%d" - idle_timeout_in_minutes = 30 + name = "%s" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" + domain_name_label = "acctest-%d" + idle_timeout_in_minutes = 30 tags { environment = "test" @@ -102,10 +102,10 @@ resource "azurerm_resource_group" "test" { } resource "azurerm_public_ip" "test" { - name = "acctestpublicip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "dynamic" + name = "acctestpublicip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Dynamic" ip_version = "%s" diff --git a/azurerm/data_source_public_ips_test.go b/azurerm/data_source_public_ips_test.go index 8be31eab98e5..4c6f90fbcf09 100644 --- a/azurerm/data_source_public_ips_test.go +++ b/azurerm/data_source_public_ips_test.go @@ -109,12 +109,12 @@ resource "azurerm_resource_group" "test" { } resource "azurerm_public_ip" "test" { - count = 7 - name = "acctestpip%s-${count.index}" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" - idle_timeout_in_minutes = 30 + count = 7 + name = "acctestpip%s-${count.index}" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" + idle_timeout_in_minutes = 30 tags { environment = "test" @@ -160,12 +160,12 @@ resource "azurerm_resource_group" "test" { } resource "azurerm_public_ip" "test" { - count = 2 - name = "acctestpipb%s-${count.index}" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" - idle_timeout_in_minutes = 30 + count = 2 + name = "acctestpipb%s-${count.index}" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" + idle_timeout_in_minutes = 30 tags { environment = "test" @@ -173,12 +173,12 @@ resource "azurerm_public_ip" "test" { } resource "azurerm_public_ip" "test2" { - count = 2 - name = "acctestpipa%s-${count.index}" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" - idle_timeout_in_minutes = 30 + count = 2 + name = "acctestpipa%s-${count.index}" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" + idle_timeout_in_minutes = 30 tags { environment = "test" @@ -207,12 +207,12 @@ resource "azurerm_resource_group" "test" { } resource "azurerm_public_ip" "dynamic" { - count = 4 - name = "acctestpipd%s-${count.index}" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "dynamic" - idle_timeout_in_minutes = 30 + count = 4 + name = "acctestpipd%s-${count.index}" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Dynamic" + idle_timeout_in_minutes = 30 tags { environment = "test" @@ -220,12 +220,12 @@ resource "azurerm_public_ip" "dynamic" { } resource "azurerm_public_ip" "static" { - count = 3 - name = "acctestpips%s-${count.index}" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" - idle_timeout_in_minutes = 30 + count = 3 + name = "acctestpips%s-${count.index}" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" + idle_timeout_in_minutes = 30 tags { environment = "test" diff --git a/azurerm/data_source_virtual_network_gateway_test.go b/azurerm/data_source_virtual_network_gateway_test.go index 04f10884f0e3..96233331ece2 100644 --- a/azurerm/data_source_virtual_network_gateway_test.go +++ b/azurerm/data_source_virtual_network_gateway_test.go @@ -49,10 +49,10 @@ resource "azurerm_subnet" "test" { } resource "azurerm_public_ip" "test" { - name = "acctestpip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "Dynamic" + name = "acctestpip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Dynamic" } resource "azurerm_virtual_network_gateway" "test" { diff --git a/azurerm/resource_arm_application_gateway_test.go b/azurerm/resource_arm_application_gateway_test.go index 5a5f9067bdfd..a80b0206413d 100644 --- a/azurerm/resource_arm_application_gateway_test.go +++ b/azurerm/resource_arm_application_gateway_test.go @@ -1098,10 +1098,10 @@ resource "azurerm_subnet" "test" { } resource "azurerm_public_ip" "test" { - name = "acctest-pubip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "dynamic" + name = "acctest-pubip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Dynamic" } `, rInt, location, rInt, rInt, rInt) } diff --git a/azurerm/resource_arm_firewall_test.go b/azurerm/resource_arm_firewall_test.go index 43c36c1e5d17..2739119be1f5 100644 --- a/azurerm/resource_arm_firewall_test.go +++ b/azurerm/resource_arm_firewall_test.go @@ -303,11 +303,11 @@ resource "azurerm_subnet" "test" { } resource "azurerm_public_ip" "test" { - name = "acctestpip%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "Static" - sku = "Standard" + name = "acctestpip%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" + sku = "Standard" } resource "azurerm_firewall" "test" { @@ -346,11 +346,11 @@ resource "azurerm_subnet" "test" { } resource "azurerm_public_ip" "test" { - name = "acctestpip%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "Static" - sku = "Standard" + name = "acctestpip%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" + sku = "Standard" } resource "azurerm_firewall" "test" { @@ -408,11 +408,11 @@ resource "azurerm_subnet" "test" { } resource "azurerm_public_ip" "test" { - name = "acctestpip%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "Static" - sku = "Standard" + name = "acctestpip%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" + sku = "Standard" } resource "azurerm_firewall" "test" { @@ -456,11 +456,11 @@ resource "azurerm_subnet" "test" { } resource "azurerm_public_ip" "test" { - name = "acctestpip%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "Static" - sku = "Standard" + name = "acctestpip%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" + sku = "Standard" } resource "azurerm_firewall" "test" { diff --git a/azurerm/resource_arm_image_test.go b/azurerm/resource_arm_image_test.go index f6778137ff39..9e28d7c0dc5b 100644 --- a/azurerm/resource_arm_image_test.go +++ b/azurerm/resource_arm_image_test.go @@ -376,11 +376,11 @@ resource "azurerm_subnet" "test" { } resource "azurerm_public_ip" "test" { - name = "acctpip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "Dynamic" - domain_name_label = "%s" + name = "acctpip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Dynamic" + domain_name_label = "%s" } resource "azurerm_network_interface" "testsource" { @@ -391,7 +391,7 @@ resource "azurerm_network_interface" "testsource" { ip_configuration { name = "testconfigurationsource" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" public_ip_address_id = "${azurerm_public_ip.test.id}" } } @@ -477,11 +477,11 @@ resource "azurerm_subnet" "test" { } resource "azurerm_public_ip" "test" { - name = "acctpip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "Dynamic" - domain_name_label = "%s" + name = "acctpip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Dynamic" + domain_name_label = "%s" } resource "azurerm_network_interface" "testsource" { @@ -492,7 +492,7 @@ resource "azurerm_network_interface" "testsource" { ip_configuration { name = "testconfigurationsource" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" public_ip_address_id = "${azurerm_public_ip.test.id}" } } @@ -597,11 +597,11 @@ resource "azurerm_subnet" "test" { } resource "azurerm_public_ip" "test" { - name = "acctpip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "Dynamic" - domain_name_label = "%s" + name = "acctpip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Dynamic" + domain_name_label = "%s" } resource "azurerm_network_interface" "testsource" { @@ -612,7 +612,7 @@ resource "azurerm_network_interface" "testsource" { ip_configuration { name = "testconfigurationsource" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" public_ip_address_id = "${azurerm_public_ip.test.id}" } } @@ -698,11 +698,11 @@ resource "azurerm_subnet" "test" { } resource "azurerm_public_ip" "test" { - name = "acctpip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "Dynamic" - domain_name_label = "%s" + name = "acctpip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Dynamic" + domain_name_label = "%s" } resource "azurerm_network_interface" "testsource" { @@ -713,7 +713,7 @@ resource "azurerm_network_interface" "testsource" { ip_configuration { name = "testconfigurationsource" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" public_ip_address_id = "${azurerm_public_ip.test.id}" } } @@ -802,7 +802,7 @@ resource "azurerm_network_interface" "testdestination" { ip_configuration { name = "testconfiguration2" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" } } @@ -863,11 +863,11 @@ resource "azurerm_subnet" "test" { } resource "azurerm_public_ip" "test" { - name = "acctpip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "Dynamic" - domain_name_label = "%s" + name = "acctpip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Dynamic" + domain_name_label = "%s" } resource "azurerm_network_interface" "testsource" { @@ -878,7 +878,7 @@ resource "azurerm_network_interface" "testsource" { ip_configuration { name = "testconfigurationsource" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" public_ip_address_id = "${azurerm_public_ip.test.id}" } } @@ -943,11 +943,11 @@ resource "azurerm_subnet" "test" { } resource "azurerm_public_ip" "test" { - name = "acctpip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "Dynamic" - domain_name_label = "%s" + name = "acctpip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Dynamic" + domain_name_label = "%s" } resource "azurerm_network_interface" "testsource" { @@ -958,7 +958,7 @@ resource "azurerm_network_interface" "testsource" { ip_configuration { name = "testconfigurationsource" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" public_ip_address_id = "${azurerm_public_ip.test.id}" } } @@ -1019,7 +1019,7 @@ resource "azurerm_network_interface" "testdestination" { ip_configuration { name = "testconfiguration2" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" } } @@ -1080,11 +1080,11 @@ resource "azurerm_subnet" "test" { } resource "azurerm_public_ip" "test" { - name = "acctpip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "Dynamic" - domain_name_label = "%s" + name = "acctpip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Dynamic" + domain_name_label = "%s" } resource "azurerm_network_interface" "testsource" { @@ -1095,7 +1095,7 @@ resource "azurerm_network_interface" "testsource" { ip_configuration { name = "testconfigurationsource" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" public_ip_address_id = "${azurerm_public_ip.test.id}" } } @@ -1181,11 +1181,11 @@ resource "azurerm_subnet" "test" { } resource "azurerm_public_ip" "test" { - name = "acctpip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "Dynamic" - domain_name_label = "%s" + name = "acctpip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Dynamic" + domain_name_label = "%s" } resource "azurerm_network_interface" "testsource" { @@ -1196,7 +1196,7 @@ resource "azurerm_network_interface" "testsource" { ip_configuration { name = "testconfigurationsource" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" public_ip_address_id = "${azurerm_public_ip.test.id}" } } diff --git a/azurerm/resource_arm_loadbalancer_backend_address_pool_test.go b/azurerm/resource_arm_loadbalancer_backend_address_pool_test.go index 3ffa394714be..20ee4597c89b 100644 --- a/azurerm/resource_arm_loadbalancer_backend_address_pool_test.go +++ b/azurerm/resource_arm_loadbalancer_backend_address_pool_test.go @@ -187,10 +187,10 @@ resource "azurerm_resource_group" "test" { } resource "azurerm_public_ip" "test" { - name = "test-ip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" + name = "test-ip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" } resource "azurerm_lb" "test" { @@ -221,10 +221,10 @@ resource "azurerm_resource_group" "test" { } resource "azurerm_public_ip" "test" { - name = "test-ip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" + name = "test-ip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" } resource "azurerm_lb" "test" { diff --git a/azurerm/resource_arm_loadbalancer_nat_pool_test.go b/azurerm/resource_arm_loadbalancer_nat_pool_test.go index ef002c3b6389..5f3905e23a95 100644 --- a/azurerm/resource_arm_loadbalancer_nat_pool_test.go +++ b/azurerm/resource_arm_loadbalancer_nat_pool_test.go @@ -227,10 +227,10 @@ resource "azurerm_resource_group" "test" { } resource "azurerm_public_ip" "test" { - name = "test-ip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" + name = "test-ip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" } resource "azurerm_lb" "test" { @@ -266,10 +266,10 @@ resource "azurerm_resource_group" "test" { } resource "azurerm_public_ip" "test" { - name = "test-ip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" + name = "test-ip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" } resource "azurerm_lb" "test" { @@ -297,7 +297,7 @@ resource "azurerm_public_ip" "test" { location = "${azurerm_resource_group.test.location}" resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" + allocation_method = "Static" } resource "azurerm_lb" "test" { @@ -347,10 +347,10 @@ resource "azurerm_resource_group" "test" { } resource "azurerm_public_ip" "test" { - name = "test-ip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" + name = "test-ip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" } resource "azurerm_lb" "test" { diff --git a/azurerm/resource_arm_loadbalancer_nat_rule_test.go b/azurerm/resource_arm_loadbalancer_nat_rule_test.go index 1e80398ee36f..85ff9ea3fcf9 100644 --- a/azurerm/resource_arm_loadbalancer_nat_rule_test.go +++ b/azurerm/resource_arm_loadbalancer_nat_rule_test.go @@ -287,10 +287,10 @@ resource "azurerm_resource_group" "test" { } resource "azurerm_public_ip" "test" { - name = "test-ip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" + name = "test-ip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" } resource "azurerm_lb" "test" { @@ -325,10 +325,10 @@ resource "azurerm_resource_group" "test" { } resource "azurerm_public_ip" "test" { - name = "test-ip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" + name = "test-ip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" } resource "azurerm_lb" "test" { @@ -352,10 +352,10 @@ resource "azurerm_resource_group" "test" { } resource "azurerm_public_ip" "test" { - name = "test-ip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" + name = "test-ip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" } resource "azurerm_lb" "test" { @@ -401,10 +401,10 @@ resource "azurerm_resource_group" "test" { } resource "azurerm_public_ip" "test" { - name = "test-ip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" + name = "test-ip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" } resource "azurerm_lb" "test" { @@ -450,10 +450,10 @@ resource "azurerm_resource_group" "test" { } resource "azurerm_public_ip" "test" { - name = "test-ip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" + name = "test-ip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" } resource "azurerm_lb" "test" { diff --git a/azurerm/resource_arm_loadbalancer_probe_test.go b/azurerm/resource_arm_loadbalancer_probe_test.go index a125354c7b6f..8054b5c76dff 100644 --- a/azurerm/resource_arm_loadbalancer_probe_test.go +++ b/azurerm/resource_arm_loadbalancer_probe_test.go @@ -258,10 +258,10 @@ resource "azurerm_resource_group" "test" { } resource "azurerm_public_ip" "test" { - name = "test-ip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" + name = "test-ip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" } resource "azurerm_lb" "test" { @@ -293,10 +293,10 @@ resource "azurerm_resource_group" "test" { } resource "azurerm_public_ip" "test" { - name = "test-ip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" + name = "test-ip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" } resource "azurerm_lb" "test" { @@ -320,10 +320,10 @@ resource "azurerm_resource_group" "test" { } resource "azurerm_public_ip" "test" { - name = "test-ip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" + name = "test-ip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" } resource "azurerm_lb" "test" { @@ -363,10 +363,10 @@ resource "azurerm_resource_group" "test" { } resource "azurerm_public_ip" "test" { - name = "test-ip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" + name = "test-ip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" } resource "azurerm_lb" "test" { @@ -406,10 +406,10 @@ resource "azurerm_resource_group" "test" { } resource "azurerm_public_ip" "test" { - name = "test-ip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" + name = "test-ip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" } resource "azurerm_lb" "test" { @@ -443,10 +443,10 @@ resource "azurerm_resource_group" "test" { } resource "azurerm_public_ip" "test" { - name = "test-ip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" + name = "test-ip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" } resource "azurerm_lb" "test" { diff --git a/azurerm/resource_arm_loadbalancer_rule_test.go b/azurerm/resource_arm_loadbalancer_rule_test.go index 155b04ace2fe..92a3b9770f04 100644 --- a/azurerm/resource_arm_loadbalancer_rule_test.go +++ b/azurerm/resource_arm_loadbalancer_rule_test.go @@ -324,10 +324,10 @@ resource "azurerm_resource_group" "test" { } resource "azurerm_public_ip" "test" { - name = "test-ip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" + name = "test-ip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" } resource "azurerm_lb" "test" { @@ -362,10 +362,10 @@ resource "azurerm_resource_group" "test" { } resource "azurerm_public_ip" "test" { - name = "test-ip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" + name = "test-ip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" } resource "azurerm_lb" "test" { @@ -390,10 +390,10 @@ resource "azurerm_resource_group" "test" { } resource "azurerm_public_ip" "test" { - name = "test-ip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" + name = "test-ip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" } resource "azurerm_lb" "test" { @@ -444,10 +444,10 @@ resource "azurerm_resource_group" "test" { } resource "azurerm_public_ip" "test" { - name = "test-ip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" + name = "test-ip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" } resource "azurerm_lb" "test" { @@ -493,10 +493,10 @@ resource "azurerm_resource_group" "test" { } resource "azurerm_public_ip" "test" { - name = "test-ip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" + name = "test-ip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" } resource "azurerm_lb" "test" { diff --git a/azurerm/resource_arm_loadbalancer_test.go b/azurerm/resource_arm_loadbalancer_test.go index f53fbeec5bdf..f533e9a33754 100644 --- a/azurerm/resource_arm_loadbalancer_test.go +++ b/azurerm/resource_arm_loadbalancer_test.go @@ -314,17 +314,17 @@ resource "azurerm_resource_group" "test" { } resource "azurerm_public_ip" "test" { - name = "test-ip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" + name = "test-ip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" } resource "azurerm_public_ip" "test1" { - name = "another-test-ip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" + name = "another-test-ip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" } resource "azurerm_lb" "test" { @@ -353,17 +353,17 @@ resource "azurerm_resource_group" "test" { } resource "azurerm_public_ip" "test" { - name = "test-ip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" + name = "test-ip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" } resource "azurerm_public_ip" "test1" { - name = "another-test-ip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" + name = "another-test-ip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" } resource "azurerm_lb" "test" { @@ -387,10 +387,10 @@ resource "azurerm_resource_group" "test" { } resource "azurerm_public_ip" "test" { - name = "test-ip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" + name = "test-ip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" } resource "azurerm_lb" "test" { diff --git a/azurerm/resource_arm_management_lock_test.go b/azurerm/resource_arm_management_lock_test.go index a0389a3950d7..30db875d17c4 100644 --- a/azurerm/resource_arm_management_lock_test.go +++ b/azurerm/resource_arm_management_lock_test.go @@ -378,11 +378,11 @@ resource "azurerm_resource_group" "test" { } resource "azurerm_public_ip" "test" { - name = "acctestpublicip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" - idle_timeout_in_minutes = 30 + name = "acctestpublicip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" + idle_timeout_in_minutes = 30 } resource "azurerm_management_lock" "test" { @@ -401,11 +401,11 @@ resource "azurerm_resource_group" "test" { } resource "azurerm_public_ip" "test" { - name = "acctestpublicip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" - idle_timeout_in_minutes = 30 + name = "acctestpublicip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" + idle_timeout_in_minutes = 30 } resource "azurerm_management_lock" "test" { diff --git a/azurerm/resource_arm_network_interface.go b/azurerm/resource_arm_network_interface.go index 36fb96d8ce51..b51732e590b3 100644 --- a/azurerm/resource_arm_network_interface.go +++ b/azurerm/resource_arm_network_interface.go @@ -81,6 +81,7 @@ func resourceArmNetworkInterface() *schema.Resource { Optional: true, }, + //TODO: should this be renamed to private_ip_address_allocation_method or private_ip_allocation_method ? "private_ip_address_version": { Type: schema.TypeString, Optional: true, diff --git a/azurerm/resource_arm_network_interface_application_gateway_association_test.go b/azurerm/resource_arm_network_interface_application_gateway_association_test.go index 72dfdf5e2aa1..e0ba751fade3 100644 --- a/azurerm/resource_arm_network_interface_application_gateway_association_test.go +++ b/azurerm/resource_arm_network_interface_application_gateway_association_test.go @@ -187,10 +187,10 @@ resource "azurerm_subnet" "backend" { } resource "azurerm_public_ip" "test" { - name = "acctestpip%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "dynamic" + name = "acctestpip%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Dynamic" } # since these variables are re-used - a locals block makes this more maintainable @@ -265,7 +265,7 @@ resource "azurerm_network_interface" "test" { ip_configuration { name = "testconfiguration1" subnet_id = "${azurerm_subnet.frontend.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" } } diff --git a/azurerm/resource_arm_network_interface_backend_address_pool_association_test.go b/azurerm/resource_arm_network_interface_backend_address_pool_association_test.go index 8a63e0202c13..b634143c595e 100644 --- a/azurerm/resource_arm_network_interface_backend_address_pool_association_test.go +++ b/azurerm/resource_arm_network_interface_backend_address_pool_association_test.go @@ -180,10 +180,10 @@ resource "azurerm_subnet" "test" { } resource "azurerm_public_ip" "test" { - name = "test-ip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" + name = "test-ip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" } resource "azurerm_lb" "test" { @@ -212,7 +212,7 @@ resource "azurerm_network_interface" "test" { ip_configuration { name = "testconfiguration1" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" } } diff --git a/azurerm/resource_arm_network_interface_nat_rule_association_test.go b/azurerm/resource_arm_network_interface_nat_rule_association_test.go index d1568b6097b7..b2ef17980dcf 100644 --- a/azurerm/resource_arm_network_interface_nat_rule_association_test.go +++ b/azurerm/resource_arm_network_interface_nat_rule_association_test.go @@ -180,10 +180,10 @@ resource "azurerm_subnet" "test" { } resource "azurerm_public_ip" "test" { - name = "test-ip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" + name = "test-ip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" } resource "azurerm_lb" "test" { @@ -215,7 +215,7 @@ resource "azurerm_network_interface" "test" { ip_configuration { name = "testconfiguration1" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" } } diff --git a/azurerm/resource_arm_network_interface_test.go b/azurerm/resource_arm_network_interface_test.go index cb6fdb413b5d..9299ef65e7df 100644 --- a/azurerm/resource_arm_network_interface_test.go +++ b/azurerm/resource_arm_network_interface_test.go @@ -561,7 +561,7 @@ resource "azurerm_network_interface" "test" { ip_configuration { name = "testconfiguration1" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" } } `, rInt, location, rInt, rInt) @@ -603,7 +603,7 @@ resource "azurerm_network_interface" "test" { ip_configuration { name = "testconfiguration1" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" } } `, rInt, location, rInt, rInt, rInt) @@ -638,14 +638,14 @@ resource "azurerm_network_interface" "test" { ip_configuration { name = "testconfiguration1" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" primary = true } ip_configuration { name = "testconfiguration2" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" } } `, rInt, location, rInt, rInt) @@ -680,14 +680,14 @@ resource "azurerm_network_interface" "test" { ip_configuration { name = "testconfiguration2" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" primary = true } ip_configuration { name = "testconfiguration1" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" } } `, rInt, location, rInt, rInt) @@ -723,7 +723,7 @@ resource "azurerm_network_interface" "test" { ip_configuration { name = "testconfiguration1" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" } } `, rInt, location, rInt, rInt) @@ -760,7 +760,7 @@ resource "azurerm_network_interface" "test" { ip_configuration { name = "testconfiguration1" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" } } `, rInt, location, rInt, rInt) @@ -795,7 +795,7 @@ resource "azurerm_network_interface" "test" { ip_configuration { name = "testconfiguration1" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" } tags { @@ -835,7 +835,7 @@ resource "azurerm_network_interface" "test" { ip_configuration { name = "testconfiguration1" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" } tags { @@ -867,11 +867,11 @@ resource "azurerm_subnet" "test" { } resource "azurerm_public_ip" "test" { - name = "test-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" - domain_name_label = "${azurerm_resource_group.test.name}" + name = "test-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" + domain_name_label = "${azurerm_resource_group.test.name}" } resource "azurerm_network_interface" "test" { @@ -882,7 +882,7 @@ resource "azurerm_network_interface" "test" { ip_configuration { name = "testconfiguration1" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "static" + private_ip_address_allocation = "Static" private_ip_address = "10.0.2.9" public_ip_address_id = "${azurerm_public_ip.test.id}" } @@ -912,11 +912,11 @@ resource "azurerm_subnet" "test" { } resource "azurerm_public_ip" "test" { - name = "test-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" - domain_name_label = "${azurerm_resource_group.test.name}" + name = "test-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" + domain_name_label = "${azurerm_resource_group.test.name}" } resource "azurerm_network_interface" "test" { @@ -927,7 +927,7 @@ resource "azurerm_network_interface" "test" { ip_configuration { name = "testconfiguration1" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" } } `, rInt, location, rInt, rInt, rInt) @@ -1005,10 +1005,10 @@ resource "azurerm_subnet" "test" { } resource "azurerm_public_ip" "testext" { - name = "acctestpip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" + name = "acctestpip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" } resource "azurerm_lb" "testext" { @@ -1041,10 +1041,10 @@ resource "azurerm_lb_nat_rule" "testext" { } resource "azurerm_public_ip" "testint" { - name = "testpublicipint" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" + name = "testpublicipint" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" } resource "azurerm_lb" "testint" { @@ -1086,7 +1086,7 @@ resource "azurerm_network_interface" "test1" { ip_configuration { name = "testconfiguration1" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" load_balancer_backend_address_pools_ids = [ "${azurerm_lb_backend_address_pool.testext.id}", @@ -1104,7 +1104,7 @@ resource "azurerm_network_interface" "test2" { ip_configuration { name = "testconfiguration1" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" load_balancer_inbound_nat_rules_ids = [ "${azurerm_lb_nat_rule.testext.id}", @@ -1144,10 +1144,10 @@ resource "azurerm_subnet" "test" { } resource "azurerm_public_ip" "test" { - name = "acctest-pubip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "dynamic" + name = "acctest-pubip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Dynamic" } resource "azurerm_application_gateway" "test" { @@ -1217,7 +1217,7 @@ resource "azurerm_network_interface" "test" { ip_configuration { name = "testconfiguration1" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" application_gateway_backend_address_pools_ids = [ "${azurerm_application_gateway.test.backend_address_pool.0.id}", @@ -1273,10 +1273,10 @@ resource "azurerm_network_security_rule" "test2" { } resource "azurerm_public_ip" "test" { - name = "acctest-%d-pip" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "Dynamic" + name = "acctest-%d-pip" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Dynamic" tags { environment = "Production" @@ -1305,7 +1305,7 @@ resource "azurerm_network_interface" "test1" { ip_configuration { name = "testconfiguration1" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" } tags { @@ -1321,7 +1321,7 @@ resource "azurerm_network_interface" "test2" { ip_configuration { name = "testconfiguration1" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" } tags { @@ -1353,10 +1353,10 @@ resource "azurerm_subnet" "test" { } resource "azurerm_public_ip" "testext" { - name = "acctestip-%d" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" + name = "acctestip-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" } resource "azurerm_network_interface" "test" { @@ -1367,7 +1367,7 @@ resource "azurerm_network_interface" "test" { ip_configuration { name = "testconfiguration1" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" public_ip_address_id = "${azurerm_public_ip.testext.id}" } } @@ -1409,7 +1409,7 @@ resource "azurerm_network_interface" "test" { ip_configuration { name = "testconfiguration1" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" application_security_group_ids = ["${azurerm_application_security_group.test.id}"] } } diff --git a/azurerm/resource_arm_packet_capture_test.go b/azurerm/resource_arm_packet_capture_test.go index 185dcaa7d850..4cb3ca943154 100644 --- a/azurerm/resource_arm_packet_capture_test.go +++ b/azurerm/resource_arm_packet_capture_test.go @@ -205,7 +205,7 @@ resource "azurerm_network_interface" "test" { ip_configuration { name = "testconfiguration1" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" } } diff --git a/azurerm/resource_arm_policy_assignment_test.go b/azurerm/resource_arm_policy_assignment_test.go index 0021cbf2f2ff..7e18fadc3e0a 100644 --- a/azurerm/resource_arm_policy_assignment_test.go +++ b/azurerm/resource_arm_policy_assignment_test.go @@ -241,9 +241,9 @@ resource "azurerm_policy_assignment" "test" { scope = "${azurerm_resource_group.test.id}" policy_definition_id = "${azurerm_policy_definition.test.id}" identity { - type = "SystemAssigned" + type = "SystemAssigned" } - location = "%s" + location = "%s" } `, ri, ri, ri, location, ri, location) } diff --git a/azurerm/resource_arm_policy_definition_test.go b/azurerm/resource_arm_policy_definition_test.go index 132828eb4ef8..67367dcfe4d0 100644 --- a/azurerm/resource_arm_policy_definition_test.go +++ b/azurerm/resource_arm_policy_definition_test.go @@ -178,14 +178,14 @@ PARAMETERS func testAzureRMPolicyDefinition_ManagementGroup(ri int) string { return fmt.Sprintf(` resource "azurerm_management_group" "test" { - display_name = "acctestmg-%d" + display_name = "acctestmg-%d" } resource "azurerm_policy_definition" "test" { - name = "acctestpol-%d" - policy_type = "Custom" - mode = "All" - display_name = "acctestpol-%d" + name = "acctestpol-%d" + policy_type = "Custom" + mode = "All" + display_name = "acctestpol-%d" management_group_id = "${azurerm_management_group.test.group_id}" policy_rule = < **Note** Public IP Standard SKUs require `public_ip_address_allocation` to be set to `static`. +-> **Note** Public IP Standard SKUs require `allocation_method` to be set to `Static`. -> **Note:** The `Standard` SKU is currently in Public Preview on an opt-in basis. [More information, including how you can register for the Preview, and which regions `Standard` SKU's are available in are available here](https://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-standard-overview) -* `public_ip_address_allocation` - (Required) Defines whether the IP address is static or dynamic. Options are Static or Dynamic. +* `allocation_method` - (Required) Defines the allocation method for this IP address. Possible values are `Static` or `Dynamic`. ~> **Note** `Dynamic` Public IP Addresses aren't allocated until they're assigned to a resource (such as a Virtual Machine or a Load Balancer) by design within Azure - [more information is available below](#ip_address). diff --git a/website/docs/r/virtual_machine.html.markdown b/website/docs/r/virtual_machine.html.markdown index 2e1fadd323f3..500dfac59027 100644 --- a/website/docs/r/virtual_machine.html.markdown +++ b/website/docs/r/virtual_machine.html.markdown @@ -48,7 +48,7 @@ resource "azurerm_network_interface" "main" { ip_configuration { name = "testconfiguration1" subnet_id = "${azurerm_subnet.internal.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" } } diff --git a/website/docs/r/virtual_machine_data_disk_attachment.html.markdown b/website/docs/r/virtual_machine_data_disk_attachment.html.markdown index 46384d6f3179..89f472c1e909 100644 --- a/website/docs/r/virtual_machine_data_disk_attachment.html.markdown +++ b/website/docs/r/virtual_machine_data_disk_attachment.html.markdown @@ -52,7 +52,7 @@ resource "azurerm_network_interface" "main" { ip_configuration { name = "internal" subnet_id = "${azurerm_subnet.internal.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" } } diff --git a/website/docs/r/virtual_machine_extension.html.markdown b/website/docs/r/virtual_machine_extension.html.markdown index f6d650ddd64f..154a7e3301dc 100644 --- a/website/docs/r/virtual_machine_extension.html.markdown +++ b/website/docs/r/virtual_machine_extension.html.markdown @@ -46,7 +46,7 @@ resource "azurerm_network_interface" "test" { ip_configuration { name = "testconfiguration1" subnet_id = "${azurerm_subnet.test.id}" - private_ip_address_allocation = "dynamic" + private_ip_address_allocation = "Dynamic" } } diff --git a/website/docs/r/virtual_machine_scale_set.html.markdown b/website/docs/r/virtual_machine_scale_set.html.markdown index 379fbd081933..0486ac5c7478 100644 --- a/website/docs/r/virtual_machine_scale_set.html.markdown +++ b/website/docs/r/virtual_machine_scale_set.html.markdown @@ -36,11 +36,11 @@ resource "azurerm_subnet" "test" { } resource "azurerm_public_ip" "test" { - name = "test" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "static" - domain_name_label = "${azurerm_resource_group.test.name}" + name = "test" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Static" + domain_name_label = "${azurerm_resource_group.test.name}" tags { environment = "staging" diff --git a/website/docs/r/virtual_network_gateway.html.markdown b/website/docs/r/virtual_network_gateway.html.markdown index f14ae518282e..92c6358f6090 100644 --- a/website/docs/r/virtual_network_gateway.html.markdown +++ b/website/docs/r/virtual_network_gateway.html.markdown @@ -39,7 +39,7 @@ resource "azurerm_public_ip" "test" { location = "${azurerm_resource_group.test.location}" resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "Dynamic" + allocation_method = "Dynamic" } resource "azurerm_virtual_network_gateway" "test" { diff --git a/website/docs/r/virtual_network_gateway_connection.html.markdown b/website/docs/r/virtual_network_gateway_connection.html.markdown index fedba2e84a1a..6291f947868b 100644 --- a/website/docs/r/virtual_network_gateway_connection.html.markdown +++ b/website/docs/r/virtual_network_gateway_connection.html.markdown @@ -46,10 +46,10 @@ resource "azurerm_local_network_gateway" "onpremise" { } resource "azurerm_public_ip" "test" { - name = "test" - location = "${azurerm_resource_group.test.location}" - resource_group_name = "${azurerm_resource_group.test.name}" - public_ip_address_allocation = "Dynamic" + name = "test" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + allocation_method = "Dynamic" } resource "azurerm_virtual_network_gateway" "test" { @@ -110,10 +110,10 @@ resource "azurerm_subnet" "us_gateway" { } resource "azurerm_public_ip" "us" { - name = "us" - location = "${azurerm_resource_group.us.location}" - resource_group_name = "${azurerm_resource_group.us.name}" - public_ip_address_allocation = "Dynamic" + name = "us" + location = "${azurerm_resource_group.us.location}" + resource_group_name = "${azurerm_resource_group.us.name}" + allocation_method = "Dynamic" } resource "azurerm_virtual_network_gateway" "us" { @@ -152,10 +152,10 @@ resource "azurerm_subnet" "europe_gateway" { } resource "azurerm_public_ip" "europe" { - name = "europe" - location = "${azurerm_resource_group.europe.location}" - resource_group_name = "${azurerm_resource_group.europe.name}" - public_ip_address_allocation = "Dynamic" + name = "europe" + location = "${azurerm_resource_group.europe.location}" + resource_group_name = "${azurerm_resource_group.europe.name}" + allocation_method = "Dynamic" } resource "azurerm_virtual_network_gateway" "europe" {