Register Azure providers when creating subscription#1438
Merged
Conversation
🦋 Changeset detectedLatest commit: b23922f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
lucacavallaro
requested changes
Mar 16, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds automatic Azure Resource Provider registration to the CLI Azure adapter so new/uninitialized subscriptions have required namespaces registered before provisioning, reducing Terraform/bootstrap failures (CES-1806).
Changes:
- Introduces a new Azure adapter module to register/check a fixed set of required Resource Providers.
- Calls provider registration during Azure subscription/environment initialization and includes provider status in
isInitialized. - Adds Vitest coverage for the new module and updates Azure cloud account service tests accordingly, plus a changeset for
@pagopa/dx-cli.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/cli/src/adapters/azure/register-resource-providers.ts | New helper to register/check required Azure Resource Providers for a subscription. |
| apps/cli/src/adapters/azure/cloud-account-service.ts | Ensures providers are registered during initialize() and includes provider registration status in isInitialized(). |
| apps/cli/src/adapters/azure/tests/register-resource-providers.test.ts | Adds unit tests for provider registration/check logic. |
| apps/cli/src/adapters/azure/tests/cloud-account-service.test.ts | Updates isInitialized tests to account for provider registration checks and mocks @azure/arm-resources. |
| .changeset/real-turkeys-scream.md | Declares a patch release for the CLI package. |
0dd2c01 to
deb0632
Compare
deb0632 to
8b0fead
Compare
Krusty93
approved these changes
Mar 18, 2026
8b0fead to
20fb377
Compare
20fb377 to
b23922f
Compare
lucacavallaro
approved these changes
Mar 20, 2026
christian-calabrese
pushed a commit
that referenced
this pull request
Mar 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes CES-1806