0

I've created an Azure Container instance that I need to set a FQDN name on. I've followed this question/answer but when I use the CLI to try to amend the Container Instance and specify the --dns-name-label.

Using AZ create, which supposedly just amends an exisiting ACI,results in an error stating that various paramters cannot be changed without deleting and recreating the ACI - it appears to be taking those parameters from some defaults somewhere, so I tried pecifying them at the CLI (to set them to wht they are already set to) and that got rid of the error message, but it totally reset the ACI - port numbers and various other parameters (sftp user names etc) were wiped out.

What I'd like to do is to be able to set the --dns-name-label in the ARM, but i can't find any reference to whether there is any syntax for that. Is that possible?

thanks in advance.

  • it looks like [this](https://stackoverflow.com/questions/47547693/azure-container-group-ip-address-disappeared) is the answer. – grizlyadams Feb 24 '22 at 12:59

1 Answers1

0

I have tested in my environment

You can use the block below in the IP Address part of your ARM template to set the DNS Name Label

"ipAddress": {
            "ports": [
                {
                    "protocol": "TCP",
                    "port": 80
                }
            ],
            "type": "Public",
            "dnsNameLabel": "[parameters('dnsNameLabel')]"
        },
RamaraoAdapa
  • 2,837
  • 2
  • 5
  • 11
  • Thanks - I did get it working after a little trial and error to help me understand the ARM template better. As well as what you posted above there's an addition to the Parameters section of the ARM template that needs to be added to either ask for or set the string you want to use for the DNS name (the "[parameters" part of what your text above refers to) Cheers – grizlyadams Feb 26 '22 at 14:06