Search code examples
azureazure-container-apps

CLI response doesn't specify what type of ingress traffic setting is selected in an Azure ContainerApp


I'm working with Azure ContainerApps via CLI.

I'm trying to check what ingress traffic setting (Allow all traffic / Limited to VNet / Limited to Container Apps Environment) is allowed in my containerapp using the CLI.

Doing an az containerapp list lists the configuration of all the containerapps that are present. From the obtained result, I know that "properties.configuration.ingress.external" tells me if public traffic is enabled but that is too generic in my case as that only talks about public access in general.

I also tried the az containerapp show command. That result doesn't help either.

Any help on this will be highly helpful.

Cheers!


Solution

  • To check the type of the ingress traffic setting enabled for a container app, you can use the below commands with the query parameter.

    Below command displays the whole set of ingress traffic features configured for a container app in Json format.

    az containerapp ingress show -n newapca -g exampleRG1
    

    If you use the --query flag as shown, you can access only those specific settings.

    Allow all Ip's:

    az containerapp ingress show -n newapca -g exampleRG1 --query external
    

    Limited to VNet:

     az containerapp ingress show -n newapca -g exampleRG1 --query vNetname
    

    enter image description here

    You can check the access-restriction list of IP's of a container app with the below given command.

    az containerapp ingress access-restriction list -n newapca -g exampleRG1
    

    enter image description here

    Refer MSDoc for the command structures.

    Note: Use az containerapp update with the --set flag to update from one setting to the other.