Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for disable_instance_discovery #1442

Merged
merged 1 commit into from
Feb 29, 2024

Conversation

p3ck
Copy link
Collaborator

@p3ck p3ck commented Feb 13, 2024

SUMMARY

Added support in ansible common to support setting disable_instance_discovery when using azure clouds and you don't have access to login.microsoftonline.com.

This can be specified as a module argument, environment variable or in credential profile. To enable set to True, default if False which doesn't change the current behaviour.

Fixes #1236

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

azure_rm_common

ADDITIONAL INFORMATION

This issue affects users who are using the Azure US Government cloud

As of today the Azure Collection fails to connect in this environment:

Network access is allowed to Azure US Government cloud. (login.microsoftonline.us)
Network access is not allowed to Azure Public cloud. (login.microsoftonline.com)
Trying to use the Azure collection in this environment fails with attempts to connect to login.microsoftonline.com.

@Fred-sun
Copy link
Collaborator

@p3ck As described in issue #1236, if we support 'disable_instance_discovery', we must first upgrade azure-identity to v1.13.0, please update 'requirements-azure.txt'. Thanks!

@Fred-sun Fred-sun added medium_priority Medium priority work in In trying to solve, or in working with contributors labels Feb 17, 2024
@p3ck
Copy link
Collaborator Author

p3ck commented Feb 19, 2024

Hello,

Thanks for the review. It looks to me like azure-identity is already updated to 1.14.0. This was done in Commit 21f6e15

Thanks!

@Fred-sun
Copy link
Collaborator

@p3ck Please add a description of the parameter 'disable_instance_discovery' to the file ~/plugins/doc_fragments/ aze. py, which has the default value. Thank you!

@Fred-sun Fred-sun added the question Further information is requested label Feb 20, 2024
@p3ck p3ck force-pushed the issue-1236 branch 2 times, most recently from 30efd1b to 729b239 Compare February 21, 2024 01:59
Copy link
Collaborator

@Fred-sun Fred-sun left a comment

Choose a reason for hiding this comment

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

Small change request!

plugins/doc_fragments/azure.py Show resolved Hide resolved
that the configured authority host is valid and trustworthy.
- Set via credential file profile or the C(AZURE_DISABLE_INSTANCE_DISCOVERY) environment variable.
type: bool
version_added: '2.2.1'
Copy link
Collaborator

Choose a reason for hiding this comment

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

version-added-must-be-major-or-minor, such as '2.3.0'

plugins/doc_fragments/azure.py Show resolved Hide resolved
Added support in ansible common to support setting
disable_instance_discovery when using azure clouds and you don't have
access to login.microsoftonline.com.

This can be specified as a module argument, environment variable or in
credential profile.  To enable set to True, default if False which
doesn't change the current behaviour.

Updated doc fragment to explain how to use it.

fix ansible-collections#1236
@Fred-sun Fred-sun added ready_for_review The PR has been modified and can be reviewed and merged and removed work in In trying to solve, or in working with contributors labels Feb 23, 2024
@xuzhang3 xuzhang3 merged commit f2fe73f into ansible-collections:dev Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
medium_priority Medium priority question Further information is requested ready_for_review The PR has been modified and can be reviewed and merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add instance_discovery toggle to modules for alternate Azure Clouds
3 participants