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

Allow for template expressions in some parameters #1446

Conversation

franciscogarcia-payroc
Copy link
Contributor

SUMMARY

We would love to be able to use templates to evaluate the values of client_id, secret, tenant and subscription_id when configuring authentication for the azure_rm inventory plugin.

PR to address issue #1438
ISSUE TYPE

  • Feature Pull Request

COMPONENT NAME

azure_rm inventory plugin

ADDITIONAL INFORMATION

Our use case is somewhat particular, and we can't leverage the cli or environment variables for various reasons and we want to avoid our secrets hard coded in file. The ideal way for us to get those values in without having them on a file on disk is to execute a lookup in a template. This behavior works as described in a few other inventory plugins we're using for enumerating VMs on other providers, but in this case the plugin only seems to accept static values in the following fields:

client_id
secret
tenant
subscription_id

the change would evaluate if the parameters passed are a template expression and would then resolve the expression before moving on to the AzureRMAuth method

@Fred-sun Fred-sun added ready_for_review The PR has been modified and can be reviewed and merged medium_priority Medium priority labels Feb 19, 2024
@franciscogarcia-payroc franciscogarcia-payroc marked this pull request as ready for review February 20, 2024 13:32
@xuzhang3 xuzhang3 merged commit 88f9b97 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 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.

3 participants