Created
August 23, 2022 12:54
-
-
Save rtrentin73/4c201a3b56d27851390552e4c298df73 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "azurerm_resource_group" "traffic-manager-acme-rg" { | |
name = "traffic-manager-acme-rg" | |
location = var.region-b | |
} | |
resource "azurerm_public_ip" "traffic-manager-acme-pip" { | |
name = "traffic-manager-acme-pip" | |
location = azurerm_resource_group.traffic-manager-acme-rg.location | |
resource_group_name = azurerm_resource_group.traffic-manager-acme-rg.name | |
allocation_method = "Static" | |
sku = "Standard" | |
} | |
resource "azurerm_traffic_manager_profile" "traffic-manager-acme" { | |
name = "acme" | |
resource_group_name = azurerm_resource_group.traffic-manager-acme-rg.name | |
traffic_routing_method = "Priority" | |
dns_config { | |
relative_name = "acme" | |
ttl = 60 | |
} | |
monitor_config { | |
protocol = "TCP" | |
port = 80 | |
path = "/" | |
interval_in_seconds = 30 | |
timeout_in_seconds = 9 | |
tolerated_number_of_failures = 3 | |
} | |
} | |
resource "azurerm_traffic_manager_external_endpoint" "east-us-lb" { | |
name = "east-us-lb" | |
profile_id = azurerm_traffic_manager_profile.traffic-manager-acme.id | |
priority = 10 | |
target = azurerm_public_ip.ingress-east-us-lb-pip.ip_address | |
} | |
resource "azurerm_traffic_manager_external_endpoint" "central-us-lb" { | |
name = "central-us-lb" | |
profile_id = azurerm_traffic_manager_profile.traffic-manager-acme.id | |
priority = 20 | |
target = azurerm_public_ip.ingress-central-us-lb-pip.ip_address | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment