简体   繁体   中英

Azure Container Instance FQDN - how do I set it in the ARM (using az create does not work)

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.

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')]"
        },

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM