Add DX cli support to multi-tenant environments - #2002
Add DX cli support to multi-tenant environments#2002christian-calabrese wants to merge 9 commits into
Conversation
Allow add environment to scaffold tenant-qualified environments while keeping Azure naming derived from the lifecycle suffix. Document the new workflow for users and agents. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Configure repository-specific OIDC credentials and GitHub environment secrets even when the Azure bootstrap resources already exist. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Include repository-specific GitHub environment configuration in the expected deployment environment generator action sequence. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
| "uat", | ||
| "prod", | ||
| ]), | ||
| new Option( |
There was a problem hiding this comment.
thought: I'm not sure removing the choice is the right thing. Potentially, users can use everything they want and our framework would probably break. Maybe would it better to add another option like add environment [--prefix cgn] --name prod?
There was a problem hiding this comment.
I agree, I would prefer to keep the choice and handle it differently. Can we reuse the already existing prefix flag?
There was a problem hiding this comment.
I’d avoid reusing prefix as the tenant identifier because it only drives Azure resource naming, while the tenant must also disambiguate repo-level surfaces such as folders, workflows, GitHub environments, and Terraform state.
The current implementation does not accept arbitrary values unchecked: Commander no longer enforces choices, but the domain schema still only accepts dev|uat|prod or <tenant>-<env>.
That said, if we want to preserve the --name dev|uat|prod contract, I think the cleaner alternative is adding a first-class --tenant cgn option and deriving the logical environment as cgn-prod, rather than overloading --prefix.
There was a problem hiding this comment.
What if we used a format similar to what the CLI already uses for the GitHub App?
We wouldn't add any new inputs, it would remain just dev/uat/prod, but the CLI could display a prompt like "Do you want to add a tenant? (y/n)" and, if confirmed, ask you to enter it.
There was a problem hiding this comment.
The current implementation does not accept arbitrary values unchecked: Commander no longer enforces choices, but the domain schema still only accepts dev|uat|prod or -.
How did this information come back to the user/agent? Should we update the companion skill too?
btw @mamu0 proposed an interesting option
There was a problem hiding this comment.
note: to maximise agentic experience, we should not ask for confirmations, but instead pass a flag
|
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://proud-mud-0405c6703-2002.westeurope.1.azurestaticapps.net |

Summary
dx add environmentto accept tenant-qualified names such asced-prodandcgn-dev.Resolves CES-1753