diff --git a/internal/services/dns/dns_cname_record_resource.go b/internal/services/dns/dns_cname_record_resource.go index 4935cdc1dedc..e29ffd631eb9 100644 --- a/internal/services/dns/dns_cname_record_resource.go +++ b/internal/services/dns/dns_cname_record_resource.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" "github.com/hashicorp/go-azure-sdk/resource-manager/dns/2018-05-01/recordsets" - "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints" + "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/trafficmanager/azure_endpoint_resource.go b/internal/services/trafficmanager/azure_endpoint_resource.go index c2c7614f78a3..8af4479748e0 100644 --- a/internal/services/trafficmanager/azure_endpoint_resource.go +++ b/internal/services/trafficmanager/azure_endpoint_resource.go @@ -9,8 +9,8 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints" - "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles" + "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints" + "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" azValidate "github.com/hashicorp/terraform-provider-azurerm/helpers/validate" @@ -82,6 +82,12 @@ func resourceAzureEndpoint() *pluginsdk.Resource { Default: true, }, + "always_serve_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + Default: false, + }, + "custom_header": { Type: pluginsdk.TypeList, Optional: true, @@ -175,12 +181,17 @@ func resourceAzureEndpointCreate(d *pluginsdk.ResourceData, meta interface{}) er Type: utils.String(fmt.Sprintf("Microsoft.Network/trafficManagerProfiles/%s", endpoints.EndpointTypeAzureEndpoints)), Properties: &endpoints.EndpointProperties{ CustomHeaders: expandEndpointCustomHeaderConfig(d.Get("custom_header").([]interface{})), + AlwaysServe: pointer.To(endpoints.AlwaysServeDisabled), EndpointStatus: &status, TargetResourceId: utils.String(d.Get("target_resource_id").(string)), Subnets: expandEndpointSubnetConfig(d.Get("subnet").([]interface{})), }, } + if alwaysServe := d.Get("always_serve_enabled").(bool); alwaysServe { + params.Properties.AlwaysServe = pointer.To(endpoints.AlwaysServeEnabled) + } + if priority := d.Get("priority").(int); priority != 0 { params.Properties.Priority = utils.Int64(int64(priority)) } @@ -240,6 +251,12 @@ func resourceAzureEndpointRead(d *pluginsdk.ResourceData, meta interface{}) erro d.Set("priority", props.Priority) d.Set("geo_mappings", props.GeoMapping) + if props.AlwaysServe != nil && *props.AlwaysServe == endpoints.AlwaysServeEnabled { + d.Set("always_serve_enabled", true) + } else { + d.Set("always_serve_enabled", false) + } + if err := d.Set("custom_header", flattenEndpointCustomHeaderConfig(props.CustomHeaders)); err != nil { return fmt.Errorf("setting `custom_header`: %s", err) } @@ -283,6 +300,14 @@ func resourceAzureEndpointUpdate(d *pluginsdk.ResourceData, meta interface{}) er params.Properties.EndpointStatus = pointer.To(status) } + if d.HasChange("always_serve_enabled") { + alwaysServe := endpoints.AlwaysServeDisabled + if d.Get("always_serve_enabled").(bool) { + alwaysServe = endpoints.AlwaysServeEnabled + } + params.Properties.AlwaysServe = pointer.To(alwaysServe) + } + if d.HasChange("custom_header") { params.Properties.CustomHeaders = expandEndpointCustomHeaderConfig(d.Get("custom_header").([]interface{})) } diff --git a/internal/services/trafficmanager/azure_endpoint_resource_test.go b/internal/services/trafficmanager/azure_endpoint_resource_test.go index 2a249f7e482a..9810df7f2e4c 100644 --- a/internal/services/trafficmanager/azure_endpoint_resource_test.go +++ b/internal/services/trafficmanager/azure_endpoint_resource_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints" + "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -227,12 +227,13 @@ resource "azurerm_public_ip" "test" { } resource "azurerm_traffic_manager_azure_endpoint" "test" { - name = "acctestend-azure%[2]d" - target_resource_id = azurerm_public_ip.test.id - weight = 5 - profile_id = azurerm_traffic_manager_profile.test.id - enabled = false - priority = 4 + name = "acctestend-azure%[2]d" + target_resource_id = azurerm_public_ip.test.id + weight = 5 + profile_id = azurerm_traffic_manager_profile.test.id + enabled = false + always_serve_enabled = true + priority = 4 geo_mappings = ["WORLD"] diff --git a/internal/services/trafficmanager/client/client.go b/internal/services/trafficmanager/client/client.go index 3d68e16e35fe..867b2ff4da11 100644 --- a/internal/services/trafficmanager/client/client.go +++ b/internal/services/trafficmanager/client/client.go @@ -6,9 +6,9 @@ package client import ( "fmt" - "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints" - "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/geographichierarchies" - "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles" + "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints" + "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/geographichierarchies" + "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles" "github.com/hashicorp/terraform-provider-azurerm/internal/common" ) diff --git a/internal/services/trafficmanager/endpoint.go b/internal/services/trafficmanager/endpoint.go index 4be7ba67b0d1..27dc5b808f11 100644 --- a/internal/services/trafficmanager/endpoint.go +++ b/internal/services/trafficmanager/endpoint.go @@ -4,7 +4,7 @@ package trafficmanager import ( - "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints" + "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints" "github.com/hashicorp/terraform-provider-azurerm/utils" ) diff --git a/internal/services/trafficmanager/external_endpoint_resource.go b/internal/services/trafficmanager/external_endpoint_resource.go index af3fc65889f4..daab0a225854 100644 --- a/internal/services/trafficmanager/external_endpoint_resource.go +++ b/internal/services/trafficmanager/external_endpoint_resource.go @@ -10,8 +10,8 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints" - "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles" + "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints" + "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" azValidate "github.com/hashicorp/terraform-provider-azurerm/helpers/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -82,6 +82,12 @@ func resourceExternalEndpoint() *pluginsdk.Resource { Default: true, }, + "always_serve_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + Default: false, + }, + "custom_header": { Type: pluginsdk.TypeList, Optional: true, @@ -182,6 +188,7 @@ func resourceExternalEndpointCreate(d *pluginsdk.ResourceData, meta interface{}) Name: utils.String(id.EndpointName), Type: utils.String(fmt.Sprintf("Microsoft.Network/trafficManagerProfiles/%s", endpoints.EndpointTypeExternalEndpoints)), Properties: &endpoints.EndpointProperties{ + AlwaysServe: pointer.To(endpoints.AlwaysServeDisabled), CustomHeaders: expandEndpointCustomHeaderConfig(d.Get("custom_header").([]interface{})), EndpointStatus: &status, Target: utils.String(d.Get("target").(string)), @@ -189,6 +196,10 @@ func resourceExternalEndpointCreate(d *pluginsdk.ResourceData, meta interface{}) }, } + if alwaysServe := d.Get("always_serve_enabled").(bool); alwaysServe { + params.Properties.AlwaysServe = pointer.To(endpoints.AlwaysServeEnabled) + } + if priority := d.Get("priority").(int); priority != 0 { params.Properties.Priority = utils.Int64(int64(priority)) } @@ -253,6 +264,12 @@ func resourceExternalEndpointRead(d *pluginsdk.ResourceData, meta interface{}) e d.Set("endpoint_location", props.EndpointLocation) d.Set("geo_mappings", props.GeoMapping) + if props.AlwaysServe != nil && *props.AlwaysServe == endpoints.AlwaysServeEnabled { + d.Set("always_serve_enabled", true) + } else { + d.Set("always_serve_enabled", false) + } + if err := d.Set("custom_header", flattenEndpointCustomHeaderConfig(props.CustomHeaders)); err != nil { return fmt.Errorf("setting `custom_header`: %s", err) } @@ -296,6 +313,14 @@ func resourceExternalEndpointUpdate(d *pluginsdk.ResourceData, meta interface{}) params.Properties.EndpointStatus = pointer.To(status) } + if d.HasChange("always_serve_enabled") { + alwaysServe := endpoints.AlwaysServeDisabled + if d.Get("always_serve_enabled").(bool) { + alwaysServe = endpoints.AlwaysServeEnabled + } + params.Properties.AlwaysServe = pointer.To(alwaysServe) + } + if d.HasChange("custom_header") { params.Properties.CustomHeaders = expandEndpointCustomHeaderConfig(d.Get("custom_header").([]interface{})) } diff --git a/internal/services/trafficmanager/external_endpoint_resource_test.go b/internal/services/trafficmanager/external_endpoint_resource_test.go index 971fd74b7cea..b1038be0e5cb 100644 --- a/internal/services/trafficmanager/external_endpoint_resource_test.go +++ b/internal/services/trafficmanager/external_endpoint_resource_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints" + "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -214,13 +214,14 @@ provider "azurerm" { %s resource "azurerm_traffic_manager_external_endpoint" "test" { - name = "acctestend-azure%d" - target = "www.example.com" - weight = 5 - profile_id = azurerm_traffic_manager_profile.test.id - enabled = false - priority = 4 - endpoint_location = azurerm_resource_group.test.location + name = "acctestend-azure%d" + target = "www.example.com" + weight = 5 + profile_id = azurerm_traffic_manager_profile.test.id + enabled = false + always_serve_enabled = true + priority = 4 + endpoint_location = azurerm_resource_group.test.location geo_mappings = ["WORLD"] diff --git a/internal/services/trafficmanager/nested_endpoint_resource.go b/internal/services/trafficmanager/nested_endpoint_resource.go index 95b0ffcbdc28..3aa28db6154a 100644 --- a/internal/services/trafficmanager/nested_endpoint_resource.go +++ b/internal/services/trafficmanager/nested_endpoint_resource.go @@ -9,8 +9,8 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints" - "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles" + "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints" + "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" azValidate "github.com/hashicorp/terraform-provider-azurerm/helpers/validate" diff --git a/internal/services/trafficmanager/nested_endpoint_resource_test.go b/internal/services/trafficmanager/nested_endpoint_resource_test.go index b1fa2838384f..7dfe1c8c15c1 100644 --- a/internal/services/trafficmanager/nested_endpoint_resource_test.go +++ b/internal/services/trafficmanager/nested_endpoint_resource_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints" + "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/trafficmanager/traffic_manager_geographical_location_data_source.go b/internal/services/trafficmanager/traffic_manager_geographical_location_data_source.go index 25b1ba809c13..8a468d777129 100644 --- a/internal/services/trafficmanager/traffic_manager_geographical_location_data_source.go +++ b/internal/services/trafficmanager/traffic_manager_geographical_location_data_source.go @@ -8,7 +8,7 @@ import ( "strings" "time" - "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/geographichierarchies" + "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/geographichierarchies" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" diff --git a/internal/services/trafficmanager/traffic_manager_profile_data_source.go b/internal/services/trafficmanager/traffic_manager_profile_data_source.go index f3d9f495133a..313cd435774e 100644 --- a/internal/services/trafficmanager/traffic_manager_profile_data_source.go +++ b/internal/services/trafficmanager/traffic_manager_profile_data_source.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles" + "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" diff --git a/internal/services/trafficmanager/traffic_manager_profile_resource.go b/internal/services/trafficmanager/traffic_manager_profile_resource.go index a2e7c8201a4c..88fa114d68e1 100644 --- a/internal/services/trafficmanager/traffic_manager_profile_resource.go +++ b/internal/services/trafficmanager/traffic_manager_profile_resource.go @@ -13,7 +13,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles" + "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/trafficmanager/traffic_manager_profile_resource_test.go b/internal/services/trafficmanager/traffic_manager_profile_resource_test.go index c54380c57c85..b68be37b5bbb 100644 --- a/internal/services/trafficmanager/traffic_manager_profile_resource_test.go +++ b/internal/services/trafficmanager/traffic_manager_profile_resource_test.go @@ -10,7 +10,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles" + "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints/README.md similarity index 94% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints/README.md index 0387d8e453d1..2b4e12058113 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints` Documentation -The `endpoints` SDK allows for interaction with the Azure Resource Manager Service `trafficmanager` (API Version `2018-08-01`). +The `endpoints` SDK allows for interaction with the Azure Resource Manager Service `trafficmanager` (API Version `2022-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). ### Import Path ```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints" +import "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints/constants.go similarity index 79% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints/constants.go index 2b3267661c7c..3cd6f8a26fc2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/constants.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints/constants.go @@ -9,6 +9,47 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. +type AlwaysServe string + +const ( + AlwaysServeDisabled AlwaysServe = "Disabled" + AlwaysServeEnabled AlwaysServe = "Enabled" +) + +func PossibleValuesForAlwaysServe() []string { + return []string{ + string(AlwaysServeDisabled), + string(AlwaysServeEnabled), + } +} + +func (s *AlwaysServe) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAlwaysServe(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAlwaysServe(input string) (*AlwaysServe, error) { + vals := map[string]AlwaysServe{ + "disabled": AlwaysServeDisabled, + "enabled": AlwaysServeEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AlwaysServe(input) + return &out, nil +} + type EndpointMonitorStatus string const ( @@ -18,6 +59,7 @@ const ( EndpointMonitorStatusInactive EndpointMonitorStatus = "Inactive" EndpointMonitorStatusOnline EndpointMonitorStatus = "Online" EndpointMonitorStatusStopped EndpointMonitorStatus = "Stopped" + EndpointMonitorStatusUnmonitored EndpointMonitorStatus = "Unmonitored" ) func PossibleValuesForEndpointMonitorStatus() []string { @@ -28,6 +70,7 @@ func PossibleValuesForEndpointMonitorStatus() []string { string(EndpointMonitorStatusInactive), string(EndpointMonitorStatusOnline), string(EndpointMonitorStatusStopped), + string(EndpointMonitorStatusUnmonitored), } } @@ -52,6 +95,7 @@ func parseEndpointMonitorStatus(input string) (*EndpointMonitorStatus, error) { "inactive": EndpointMonitorStatusInactive, "online": EndpointMonitorStatusOnline, "stopped": EndpointMonitorStatusStopped, + "unmonitored": EndpointMonitorStatusUnmonitored, } if v, ok := vals[strings.ToLower(input)]; ok { return &v, nil diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/id_endpointtype.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints/id_endpointtype.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/id_endpointtype.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints/id_endpointtype.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints/method_createorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints/method_createorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/model_deleteoperationresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints/model_deleteoperationresult.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/model_deleteoperationresult.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints/model_deleteoperationresult.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/model_endpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints/model_endpoint.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/model_endpoint.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints/model_endpoint.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/model_endpointproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints/model_endpointproperties.go similarity index 93% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/model_endpointproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints/model_endpointproperties.go index 6912f7280d35..2a844ade2b76 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/model_endpointproperties.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints/model_endpointproperties.go @@ -4,6 +4,7 @@ package endpoints // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EndpointProperties struct { + AlwaysServe *AlwaysServe `json:"alwaysServe,omitempty"` CustomHeaders *[]EndpointPropertiesCustomHeadersInlined `json:"customHeaders,omitempty"` EndpointLocation *string `json:"endpointLocation,omitempty"` EndpointMonitorStatus *EndpointMonitorStatus `json:"endpointMonitorStatus,omitempty"` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/model_endpointpropertiescustomheadersinlined.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints/model_endpointpropertiescustomheadersinlined.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/model_endpointpropertiescustomheadersinlined.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints/model_endpointpropertiescustomheadersinlined.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/model_endpointpropertiessubnetsinlined.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints/model_endpointpropertiessubnetsinlined.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/model_endpointpropertiessubnetsinlined.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints/model_endpointpropertiessubnetsinlined.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints/version.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints/version.go index a53308e8ea0d..d7f6d1db3545 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints/version.go @@ -5,7 +5,7 @@ import "fmt" // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -const defaultApiVersion = "2018-08-01" +const defaultApiVersion = "2022-04-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/endpoints/%s", defaultApiVersion) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/geographichierarchies/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/geographichierarchies/README.md similarity index 89% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/geographichierarchies/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/geographichierarchies/README.md index b222e2e2618a..50903ee98003 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/geographichierarchies/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/geographichierarchies/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/geographichierarchies` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/geographichierarchies` Documentation -The `geographichierarchies` SDK allows for interaction with the Azure Resource Manager Service `trafficmanager` (API Version `2018-08-01`). +The `geographichierarchies` SDK allows for interaction with the Azure Resource Manager Service `trafficmanager` (API Version `2022-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). ### Import Path ```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/geographichierarchies" +import "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/geographichierarchies" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/geographichierarchies/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/geographichierarchies/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/geographichierarchies/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/geographichierarchies/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/geographichierarchies/method_getdefault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/geographichierarchies/method_getdefault.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/geographichierarchies/method_getdefault.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/geographichierarchies/method_getdefault.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/geographichierarchies/model_geographichierarchyproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/geographichierarchies/model_geographichierarchyproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/geographichierarchies/model_geographichierarchyproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/geographichierarchies/model_geographichierarchyproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/geographichierarchies/model_region.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/geographichierarchies/model_region.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/geographichierarchies/model_region.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/geographichierarchies/model_region.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/geographichierarchies/model_trafficmanagergeographichierarchy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/geographichierarchies/model_trafficmanagergeographichierarchy.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/geographichierarchies/model_trafficmanagergeographichierarchy.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/geographichierarchies/model_trafficmanagergeographichierarchy.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/geographichierarchies/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/geographichierarchies/version.go similarity index 89% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/geographichierarchies/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/geographichierarchies/version.go index d29c4332a4e1..44d8950b7ce0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/geographichierarchies/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/geographichierarchies/version.go @@ -5,7 +5,7 @@ import "fmt" // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -const defaultApiVersion = "2018-08-01" +const defaultApiVersion = "2022-04-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/geographichierarchies/%s", defaultApiVersion) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/README.md similarity index 84% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/README.md index a3c7091ba4ff..87bb17478482 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/README.md @@ -1,7 +1,7 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles` Documentation -The `profiles` SDK allows for interaction with the Azure Resource Manager Service `trafficmanager` (API Version `2018-08-01`). +The `profiles` SDK allows for interaction with the Azure Resource Manager Service `trafficmanager` (API Version `2022-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). @@ -9,7 +9,7 @@ This readme covers example usages, but further information on [using this SDK ca ```go import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles" +import "github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles" ``` @@ -21,6 +21,27 @@ client.Client.Authorizer = authorizer ``` +### Example Usage: `ProfilesClient.CheckTrafficManagerNameAvailabilityV2` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +payload := profiles.CheckTrafficManagerRelativeDnsNameAvailabilityParameters{ + // ... +} + + +read, err := client.CheckTrafficManagerNameAvailabilityV2(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + ### Example Usage: `ProfilesClient.CheckTrafficManagerRelativeDnsNameAvailability` ```go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/constants.go similarity index 90% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/constants.go index 8a703cfc8493..157f4eb86837 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/constants.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/constants.go @@ -56,6 +56,47 @@ func parseAllowedEndpointRecordType(input string) (*AllowedEndpointRecordType, e return &out, nil } +type AlwaysServe string + +const ( + AlwaysServeDisabled AlwaysServe = "Disabled" + AlwaysServeEnabled AlwaysServe = "Enabled" +) + +func PossibleValuesForAlwaysServe() []string { + return []string{ + string(AlwaysServeDisabled), + string(AlwaysServeEnabled), + } +} + +func (s *AlwaysServe) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAlwaysServe(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAlwaysServe(input string) (*AlwaysServe, error) { + vals := map[string]AlwaysServe{ + "disabled": AlwaysServeDisabled, + "enabled": AlwaysServeEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AlwaysServe(input) + return &out, nil +} + type EndpointMonitorStatus string const ( @@ -65,6 +106,7 @@ const ( EndpointMonitorStatusInactive EndpointMonitorStatus = "Inactive" EndpointMonitorStatusOnline EndpointMonitorStatus = "Online" EndpointMonitorStatusStopped EndpointMonitorStatus = "Stopped" + EndpointMonitorStatusUnmonitored EndpointMonitorStatus = "Unmonitored" ) func PossibleValuesForEndpointMonitorStatus() []string { @@ -75,6 +117,7 @@ func PossibleValuesForEndpointMonitorStatus() []string { string(EndpointMonitorStatusInactive), string(EndpointMonitorStatusOnline), string(EndpointMonitorStatusStopped), + string(EndpointMonitorStatusUnmonitored), } } @@ -99,6 +142,7 @@ func parseEndpointMonitorStatus(input string) (*EndpointMonitorStatus, error) { "inactive": EndpointMonitorStatusInactive, "online": EndpointMonitorStatusOnline, "stopped": EndpointMonitorStatusStopped, + "unmonitored": EndpointMonitorStatusUnmonitored, } if v, ok := vals[strings.ToLower(input)]; ok { return &v, nil diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/id_trafficmanagerprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/id_trafficmanagerprofile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/id_trafficmanagerprofile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/id_trafficmanagerprofile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/method_checktrafficmanagernameavailabilityv2.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/method_checktrafficmanagernameavailabilityv2.go new file mode 100644 index 000000000000..e351ef41d8cb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/method_checktrafficmanagernameavailabilityv2.go @@ -0,0 +1,57 @@ +package profiles + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CheckTrafficManagerNameAvailabilityV2OperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *TrafficManagerNameAvailability +} + +// CheckTrafficManagerNameAvailabilityV2 ... +func (c ProfilesClient) CheckTrafficManagerNameAvailabilityV2(ctx context.Context, id commonids.SubscriptionId, input CheckTrafficManagerRelativeDnsNameAvailabilityParameters) (result CheckTrafficManagerNameAvailabilityV2OperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/providers/Microsoft.Network/checkTrafficManagerNameAvailabilityV2", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_checktrafficmanagerrelativednsnameavailability.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/method_checktrafficmanagerrelativednsnameavailability.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_checktrafficmanagerrelativednsnameavailability.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/method_checktrafficmanagerrelativednsnameavailability.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/method_createorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/method_createorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_listbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/method_listbyresourcegroup.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_listbyresourcegroup.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/method_listbyresourcegroup.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_listbysubscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/method_listbysubscription.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_listbysubscription.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/method_listbysubscription.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/model_checktrafficmanagerrelativednsnameavailabilityparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/model_checktrafficmanagerrelativednsnameavailabilityparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/model_checktrafficmanagerrelativednsnameavailabilityparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/model_checktrafficmanagerrelativednsnameavailabilityparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/model_deleteoperationresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/model_deleteoperationresult.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/model_deleteoperationresult.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/model_deleteoperationresult.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/model_dnsconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/model_dnsconfig.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/model_dnsconfig.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/model_dnsconfig.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/model_endpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/model_endpoint.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/model_endpoint.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/model_endpoint.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/model_endpointproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/model_endpointproperties.go similarity index 93% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/model_endpointproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/model_endpointproperties.go index 786310beba91..9cfdfe59b0d5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/model_endpointproperties.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/model_endpointproperties.go @@ -4,6 +4,7 @@ package profiles // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EndpointProperties struct { + AlwaysServe *AlwaysServe `json:"alwaysServe,omitempty"` CustomHeaders *[]EndpointPropertiesCustomHeadersInlined `json:"customHeaders,omitempty"` EndpointLocation *string `json:"endpointLocation,omitempty"` EndpointMonitorStatus *EndpointMonitorStatus `json:"endpointMonitorStatus,omitempty"` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/model_endpointpropertiescustomheadersinlined.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/model_endpointpropertiescustomheadersinlined.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/model_endpointpropertiescustomheadersinlined.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/model_endpointpropertiescustomheadersinlined.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/model_endpointpropertiessubnetsinlined.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/model_endpointpropertiessubnetsinlined.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/model_endpointpropertiessubnetsinlined.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/model_endpointpropertiessubnetsinlined.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/model_monitorconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/model_monitorconfig.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/model_monitorconfig.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/model_monitorconfig.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/model_monitorconfigcustomheadersinlined.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/model_monitorconfigcustomheadersinlined.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/model_monitorconfigcustomheadersinlined.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/model_monitorconfigcustomheadersinlined.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/model_monitorconfigexpectedstatuscoderangesinlined.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/model_monitorconfigexpectedstatuscoderangesinlined.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/model_monitorconfigexpectedstatuscoderangesinlined.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/model_monitorconfigexpectedstatuscoderangesinlined.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/model_profile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/model_profile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/model_profile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/model_profile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/model_profilelistresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/model_profilelistresult.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/model_profilelistresult.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/model_profilelistresult.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/model_profileproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/model_profileproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/model_profileproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/model_profileproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/model_trafficmanagernameavailability.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/model_trafficmanagernameavailability.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/model_trafficmanagernameavailability.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/model_trafficmanagernameavailability.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/version.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/version.go index 660e41e5df6d..e4b4487d8221 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles/version.go @@ -5,7 +5,7 @@ import "fmt" // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -const defaultApiVersion = "2018-08-01" +const defaultApiVersion = "2022-04-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/profiles/%s", defaultApiVersion) diff --git a/vendor/modules.txt b/vendor/modules.txt index ab2ccbdab406..d8348a1f876a 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1024,9 +1024,9 @@ github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15 github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/environments github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/eventsources github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/referencedatasets -github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints -github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/geographichierarchies -github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles +github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints +github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/geographichierarchies +github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/authorizations diff --git a/website/docs/r/traffic_manager_azure_endpoint.html.markdown b/website/docs/r/traffic_manager_azure_endpoint.html.markdown index 94dedf06b08f..d5e616045868 100644 --- a/website/docs/r/traffic_manager_azure_endpoint.html.markdown +++ b/website/docs/r/traffic_manager_azure_endpoint.html.markdown @@ -52,10 +52,11 @@ resource "azurerm_traffic_manager_profile" "example" { } resource "azurerm_traffic_manager_azure_endpoint" "example" { - name = "example-endpoint" - profile_id = azurerm_traffic_manager_profile.example.id - weight = 100 - target_resource_id = azurerm_public_ip.example.id + name = "example-endpoint" + profile_id = azurerm_traffic_manager_profile.example.id + always_serve_enabled = true + weight = 100 + target_resource_id = azurerm_public_ip.example.id } ``` @@ -73,6 +74,8 @@ The following arguments are supported: --- +* `always_serve_enabled` - (Optional) If Always Serve is enabled, probing for endpoint health will be disabled and endpoints will be included in the traffic routing method. Defaults to `false`. + * `custom_header` - (Optional) One or more `custom_header` blocks as defined below. * `enabled` - (Optional) Is the endpoint enabled? Defaults to `true`. diff --git a/website/docs/r/traffic_manager_external_endpoint.html.markdown b/website/docs/r/traffic_manager_external_endpoint.html.markdown index 3b153cfde56e..65a167258f84 100644 --- a/website/docs/r/traffic_manager_external_endpoint.html.markdown +++ b/website/docs/r/traffic_manager_external_endpoint.html.markdown @@ -43,10 +43,11 @@ resource "azurerm_traffic_manager_profile" "example" { } resource "azurerm_traffic_manager_external_endpoint" "example" { - name = "example-endpoint" - profile_id = azurerm_traffic_manager_profile.example.id - weight = 100 - target = "www.example.com" + name = "example-endpoint" + profile_id = azurerm_traffic_manager_profile.example.id + always_serve_enabled = true + weight = 100 + target = "www.example.com" } ``` @@ -66,6 +67,8 @@ The following arguments are supported: --- +* `always_serve_enabled` - (Optional) If Always Serve is enabled, probing for endpoint health will be disabled and endpoints will be included in the traffic routing method. Defaults to `false`. + * `custom_header` - (Optional) One or more `custom_header` blocks as defined below. * `enabled` - (Optional) Is the endpoint enabled? Defaults to `true`.