azurerm_traffic_manager_nested_endpoint

Manages a Nested Endpoint within a Traffic Manager Profile.

Example Usage

resource "azurerm_resource_group" "example" {
  name     = "example-resources"
  location = "West Europe"
}

resource "azurerm_public_ip" "example" {
  name                = "example-publicip"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  allocation_method   = "Static"
  domain_name_label   = "example-pip"
}


resource "azurerm_traffic_manager_profile" "parent" {
  name                   = "parent-profile"
  resource_group_name    = azurerm_resource_group.example.name
  traffic_routing_method = "Weighted"

  dns_config {
    relative_name = "parent-profile"
    ttl           = 100
  }

  monitor_config {
    protocol                     = "HTTP"
    port                         = 80
    path                         = "/"
    interval_in_seconds          = 30
    timeout_in_seconds           = 9
    tolerated_number_of_failures = 3
  }

  tags = {
    environment = "Production"
  }
}

resource "azurerm_traffic_manager_profile" "nested" {
  name                   = "nested-profile"
  resource_group_name    = azurerm_resource_group.example.name
  traffic_routing_method = "Priority"

  dns_config {
    relative_name = "nested-profile"
    ttl           = 30
  }

  monitor_config {
    protocol = "HTTP"
    port     = 443
    path     = "/"
  }
}

resource "azurerm_traffic_manager_nested_endpoint" "example" {
  name                    = "example-endpoint"
  target_resource_id      = azurerm_traffic_manager_profile.nested.id
  priority                = 1
  profile_id              = azurerm_traffic_manager_profile.parent.id
  minimum_child_endpoints = 9
  weight                  = 5
}

Argument Reference

The following arguments are supported:

~>NOTE: If min_child_endpoints is less than either minimum_required_child_endpoints_ipv4 or minimum_required_child_endpoints_ipv6, then it won't have any effect.



A custom_header block supports the following:


A subnet block supports the following:

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

Import

Nested Endpoints can be imported using the resource id, e.g.

terraform import azurerm_traffic_manager_nested_endpoint.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-resources/providers/Microsoft.Network/trafficManagerProfiles/example-profile/NestedEndpoints/example-endpoint