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 provider configuration values to be set by environment variables #1636

Closed
christophermaier opened this issue Sep 22, 2021 · 2 comments
Closed
Assignees
Labels
kind/enhancement Improvements or new features resolution/fixed This issue was fixed

Comments

@christophermaier
Copy link

When running Pulumi in AWS it would be useful to rely on the instance metadata service to provide the AWS Provider with the necessary credentials to run.

I know that #1288 set the default value of aws:skipMetadataApiCheck and other associated configuration variables to true to eliminate the additional wait time that making such calls can take, which makes sense. However, when running in AWS (particularly in a CI/CD situation) it would be convenient to set the value of aws:skipMetadataApiCheck to false globally in the environment, rather than have to set it in every stack (and thus incur the additional network overhead when not running in AWS).

aws:skipMetadataApiCheck happens to be the particular configuration value that I stumbled across today, but other provider configuration values (particularly the ones affected by #1288) may also benefit from being able to be set at the environment level as well.

@christophermaier christophermaier added the kind/enhancement Improvements or new features label Sep 22, 2021
@stack72 stack72 self-assigned this Sep 22, 2021
@christophermaier
Copy link
Author

In retrospect, I believe one of the reasons that I got tripped up on this was the fact that the documentation on these options (the ones changed in #1288) is misleading: https://www.pulumi.com/docs/reference/pkg/aws/provider/ aws:skipMetadataApiCheck isn't documented at all, none of the others tells what the default value is, and the ones that are documented are all phrased in terms that make them seem applicable only for running on non-AWS (but compatible) platforms. Thus, as someone running my Pulumi jobs on real AWS infrastructure (that is, our CI/CD infrastructure is hosted in AWS, and we run Pulumi jobs from there), I assumed that I wouldn't need to be concerned about these values, and that an AWS provider would know how to work on AWS out of the box.

The documentation on https://pypi.org/project/pulumi-aws/ is better, but I only stumbled upon that by accident; I generally look for documentation on the Pulumi website directly. Even the documentation for these options on PyPI, while more complete than what's on the Pulumi site, is still largely talked about in terms of interacting with a non-AWS platforms, and only a careful and thorough reading uncovers the fact that these are disabled by default for performance reasons, and thus are still very relevant for people running Pulumi in AWS.

@stack72 stack72 removed their assignment Nov 15, 2021
@iwahbe iwahbe added the resolution/fixed This issue was fixed label Jul 18, 2023
@iwahbe iwahbe self-assigned this Jul 18, 2023
@iwahbe
Copy link
Member

iwahbe commented Jul 18, 2023

Thanks for the suggestion. I believe that 463478e added support for this.

If you had something else, please open a new issue with a before and after example of the desired behavior.

@iwahbe iwahbe closed this as completed Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements or new features resolution/fixed This issue was fixed
Projects
None yet
Development

No branches or pull requests

3 participants