{ContainerApp} Add secret set examples for special characters #32720
+18
−11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related command
az containerapp secret set
Description
This PR improves the help/docs examples for
az containerapp secret setby 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
Verify help content renders and the module loads:
python3 -m py_compile src/azure-cli/azure/cli/command_modules/containerapp/_help.py(Optional functional validation if you have an Azure subscription + Container App)
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'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'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.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.