terraform-azure-course icon indicating copy to clipboard operation
terraform-azure-course copied to clipboard

Autoscaling-demo DNS error on line 18 of loadbalancer.tf

Open dd-ctss opened this issue 3 years ago • 0 comments

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" {

dd-ctss avatar Dec 21 '21 18:12 dd-ctss