azurerm_traffic_manager_endpoint
Manages a Traffic Manager Endpoint.
Example Usage
resource "random_id" "server" { keepers = { azi_id = 1 } byte_length = 8 } resource "azurerm_resource_group" "test" { name = "trafficmanagerendpointTest" location = "West US" } resource "azurerm_traffic_manager_profile" "test" { name = "${random_id.server.hex}" resource_group_name = "${azurerm_resource_group.test.name}" traffic_routing_method = "Weighted" dns_config { relative_name = "${random_id.server.hex}" ttl = 100 } monitor_config { protocol = "http" port = 80 path = "/" } tags { environment = "Production" } } resource "azurerm_traffic_manager_endpoint" "test" { name = "${random_id.server.hex}" resource_group_name = "${azurerm_resource_group.test.name}" profile_name = "${azurerm_traffic_manager_profile.test.name}" target = "terraform.io" type = "externalEndpoints" weight = 100 }
Argument Reference
The following arguments are supported:
-
name
- (Required) The name of the Traffic Manager endpoint. Changing this forces a new resource to be created. -
resource_group_name
- (Required) The name of the resource group in which to create the Traffic Manager endpoint. -
profile_name
- (Required) The name of the Traffic Manager Profile to attach create the Traffic Manager endpoint. -
endpoint_status
- (Optional) The status of the Endpoint, can be set to eitherEnabled
orDisabled
. Defaults toEnabled
. -
type
- (Required) The Endpoint type, must be one of: -
target
- (Optional) The FQDN DNS name of the target. This argument must be provided for an endpoint of typeexternalEndpoints
, for other types it will be computed. -
target_resource_id
- (Optional) The resource id of an Azure resource to target. This argument must be provided for an endpoint of typeazureEndpoints
ornestedEndpoints
. -
weight
- (Optional) Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using theWeighted
traffic routing method. Supports values between 1 and 1000. -
priority
- (Optional) Specifies the priority of this Endpoint, this must be specified for Profiles using thePriority
traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation. -
endpoint_location
- (Optional) Specifies the Azure location of the Endpoint, this must be specified for Profiles using thePerformance
routing method if the Endpoint is of either typenestedEndpoints
orexternalEndpoints
. For Endpoints of typeazureEndpoints
the value will be taken from the location of the Azure target resource. -
min_child_endpoints
- (Optional) This argument specifies the minimum number of endpoints that must be ‘online’ in the child profile in order for the parent profile to direct traffic to any of the endpoints in that child profile. This argument only applies to Endpoints of typenestedEndpoints
and defaults to1
. -
geo_mappings
- (Optional) A list of Geographic Regions used to distribute traffic, such asWORLD
,UK
orDE
. The same location can't be specified in two endpoints. See the Geographic Hierarchies documentation for more information.
Attributes Reference
The following attributes are exported:
-
id
- The Traffic Manager Endpoint id.
Import
Traffic Manager Endpoints can be imported using the resource id
, e.g.
terraform import azurerm_traffic_manager_endpoint.testEndpoints /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/trafficManagerProfiles/mytrafficmanagerprofile1/azureEndpoints/mytrafficmanagerendpoint
© 2018 HashiCorpLicensed under the MPL 2.0 License.
https://www.terraform.io/docs/providers/azurerm/r/traffic_manager_endpoint.html