Skip to content

provider - allow missing subscription_id when use_cli is true#29985

Merged
jackofallops merged 1 commit intomainfrom
b/allow-provider-to-fallback-to-cli-for-subscription-id
Jun 24, 2025
Merged

provider - allow missing subscription_id when use_cli is true#29985
jackofallops merged 1 commit intomainfrom
b/allow-provider-to-fallback-to-cli-for-subscription-id

Conversation

@jackofallops
Copy link
Member

@jackofallops jackofallops commented Jun 24, 2025

Community Note

  • Please vote on this PR by adding a 👍 reaction to the original PR to help the community and maintainers prioritize for review
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for PR followers and do not help prioritize for review

Description

subscription_id is a required provider configuration value, however, when using az-cli auth it is provided implicitly. This PR updates the provider to allow for this condition that was unintentionally blocked.

Note: Users must ensure that appropriate auth and configuration is available to the cli user and ensure the use_cli provider property is set to true for this functionality to be functional and operate as expected.

PR Checklist

  • I have followed the guidelines in our Contributing Documentation.
  • I have checked to ensure there aren't other open Pull Requests for the same update/change.
  • I have checked if my changes close any open issues. If so please include appropriate closing keywords below.
  • I have updated/added Documentation as required written in a helpful and kind way to assist users that may be unfamiliar with the resource / data source.
  • I have used a meaningful PR title to help maintainers and other users understand this change and help prevent duplicate work.
    For example: “resource_name_here - description of change e.g. adding property new_property_name_here

Testing

  • My submission includes Test coverage as described in the Contribution Guide and the tests pass. (if this is not possible for any reason, please include details of why you did or could not add test coverage)

Change Log

Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.

  • provider - support az-cli fallback for required subscription_id value when use_cli is set to true

This is a (please select all that apply):

  • Bug Fix
  • New Feature (ie adding a service, resource, or data source)
  • Enhancement
  • Breaking Change

Related Issue(s)

Closes #28627

Rollback Plan

If a change needs to be reverted, we will publish an updated version of the provider.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

Note

If this PR changes meaningfully during the course of review please update the title and description as required.

@jackofallops jackofallops requested a review from a team as a code owner June 24, 2025 09:07
Copy link
Member

@catriona-m catriona-m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jackofallops LGTM!

@jackofallops jackofallops merged commit 11f5e12 into main Jun 24, 2025
30 checks passed
@jackofallops jackofallops deleted the b/allow-provider-to-fallback-to-cli-for-subscription-id branch June 24, 2025 10:50
@github-actions github-actions bot added this to the v4.35.0 milestone Jun 24, 2025
jackofallops added a commit that referenced this pull request Jun 24, 2025
mbfrahry pushed a commit that referenced this pull request Jul 1, 2025
@andre0xFF
Copy link

andre0xFF commented Jul 7, 2025

can use_cli parameter be picked up from the ARM_USE_CLI environment variable? The documentation doesn't say if anything but other parameters, like use_msi and use_oidc, can.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2025

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for fallback to Azure CLI subscription ID

3 participants