diff --git a/terraform/infrastructure/azure/main.tf b/terraform/infrastructure/azure/main.tf index 16b7c6bb7..a3a902e90 100644 --- a/terraform/infrastructure/azure/main.tf +++ b/terraform/infrastructure/azure/main.tf @@ -40,6 +40,7 @@ locals { { name = "recovery", port = "9999", health_check_protocol = "Tcp", path = null, priority = 104 }, { name = "join", port = "30090", health_check_protocol = "Tcp", path = null, priority = 105 }, var.debug ? [{ name = "debugd", port = "4000", health_check_protocol = "Tcp", path = null, priority = 106 }] : [], + var.emergency_ssh ? [{ name = "ssh", port = "22", health_check_protocol = "Tcp", path = null, priority = 107 }] : [], ]) // wildcard_lb_dns_name is the DNS name of the load balancer with a wildcard for the name. // example: given "name-1234567890.location.cloudapp.azure.com" it will return "*.location.cloudapp.azure.com" @@ -296,89 +297,21 @@ data "azurerm_user_assigned_identity" "uaid" { resource_group_name = local.uai_resource_group } -############## For emergency ssh access ############## -resource "azurerm_public_ip" "loadbalancer_ssh_ip" { - count = var.emergency_ssh ? 1 : 0 - name = "${local.name}-ssh-lb" - domain_name_label = "${local.name}-ssh" - resource_group_name = var.resource_group - location = var.location - allocation_method = "Static" - sku = "Standard" - tags = local.tags +# emergency ssh configuration files +resource "local_file" "ssh_config" { + filename = "./ssh_config" + file_permission = "0600" + content = <