Skip to content

Weird behaviour when using az containerapp command with --yaml flag #27477

@joonvena

Description

@joonvena

Describe the bug

When using az containerapp create --yaml <file> command it returns:
the following arguments are required: --name/-n, --resource-group/-g

Then when the arguments are given in the command it says:
Additional flags were passed along with --yaml. These flags will be ignored, and the configuration defined in the yaml will be used instead

This sound like a bug to me a i would imagine it should read the resourceGroup and the name from the yaml also without having to define those arguments separately to create command.

Also other thing that when the name inside the yaml file differs from the one that is given to az command it outputs:
The app name provided in the --yaml file "mycontainerapp" does not match the one provided in the --name flag "test-ca". The one provided in the --yaml file will be used.

But in the end the one that was given with the flag gets used regardless what the output says.

Related command

az containerapp create --yaml

Make sure the -n flag differs from the one defined in the yaml file.
az containerapp create -n <name> -g <rg> --yaml

Errors

Issue script & Debug output

Expected behavior

I would expect that when az containerapp create --yaml <file> command is run it could read all the settings there without having to pass any additional flags to command. Also if i would pass the additional flags it should then use the values from the yaml file as the output states from the command

Environment Summary

azure-cli 2.53.0

core 2.53.0
telemetry 1.1.0

Extensions:
containerapp 0.3.41

Dependencies:
msal 1.24.0b2
azure-mgmt-resource 23.1.0b2

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Auto-AssignAuto assign by botContainerAppService AttentionThis issue is responsible by Azure service team.act-observability-squadbugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions