terraform-azure-course
terraform-azure-course copied to clipboard
Autoscaling-demo DNS error on line 18 of loadbalancer.tf
If you see the below error when running terraform apply, then edit the loadbalancer.tf file to change line 18 from "domain_name_label = azurerm_resource_group.demo.name" to "domain_name_label = "demo-public-ip" and terraform apply will work perfectly.
Error: creating/updating Public Ip Address: (Name "instance1-public-ip" / Resource Group "autoscaling-demo"): network.PublicIPAddressesClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="DnsRecordInUse" Message="DNS record autoscaling-demo.westeurope.cloudapp.azure.com is already used by another public IP." Details=[]
with azurerm_public_ip.demo, on loadbalancer.tf line 13, in resource "azurerm_public_ip" "demo": 13: resource "azurerm_public_ip" "demo" {