Skip to content

Conversation

@vibhuanand
Copy link

Related command
az containerapp secret set

Description
This PR improves the help/docs examples for az containerapp secret set by adding non-trivial examples that demonstrate how to pass secret values containing spaces and special characters (e.g., ;, :, ", ') safely.
The current examples are trivial and don’t show quoting/escaping patterns that users commonly need in CI pipelines and interactive shells. This adds clear Bash and PowerShell examples for single and multiple secrets.

Fixes #32658

Testing Guide

  1. Verify help content renders and the module loads:

    • python3 -m py_compile src/azure-cli/azure/cli/command_modules/containerapp/_help.py
  2. (Optional functional validation if you have an Azure subscription + Container App)

    • Create/update secrets using the patterns shown:
      • Bash:
        • az containerapp secret set -n <app> -g <rg> --secrets 'connString=Server=tcp:myserver;User Id=my user;Password=P@ss w0rd;'
        • az containerapp secret set -n <app> -g <rg> --secrets 'displayName="Test User 08" <testuser08@something.com>' 'apostrophe=Bob'\''s secret'
      • PowerShell:
        • az containerapp secret set -n <app> -g <rg> --secrets 'connString=Server=tcp:myserver;User Id=my user;Password=P@ss w0rd;' 'displayName="Test User 08" <testuser08@something.com>' 'apostrophe=Bob''s secret'
    • Confirm the secrets were stored:
      • az containerapp secret list -n <app> -g <rg>

History Notes
N/A (documentation/help examples only; no customer-facing behavior change beyond improved examples)


This checklist is used to make sure that common guidelines for a pull request are followed.

@azure-client-tools-bot-prd
Copy link

Validation for Azure CLI Full Test Starting...

Thanks for your contribution!

@yonzhan
Copy link
Collaborator

yonzhan commented Jan 29, 2026

Thank you for your contribution! We will review the pull request and get back to you soon.

@azure-client-tools-bot-prd
Copy link

Validation for Breaking Change Starting...

Thanks for your contribution!

@github-actions
Copy link

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@microsoft-github-policy-service
Copy link
Contributor

Thank you for your contribution @vibhuanand! We will review the pull request and get back to you soon.

@vibhuanand vibhuanand closed this Jan 29, 2026
@vibhuanand vibhuanand deleted the doc-containerapp-secret-set-specialchars branch January 29, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto-Assign Auto assign by bot ContainerApp customer-reported Issues that are reported by GitHub users external to the Azure organization.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide examples for az containerapp secret set with special chars.

3 participants