Open EugenKon opened 5 months ago
Voting for Prioritization
Volunteering to Work on This Issue
Hey @EugenKon 👋 Thanks for taking the time to raise this so we could take another look at it! In this case, the order of precedence is profile
and then AWS_PROFILE
. This is true for all of the provider options that accept both a configuration argument and an environment variable, so we mention it at the top of the configuration document.
On this page, we've attempted to strike a balance between having that information available (currently in a centralized place at the top of the page) without being too repetitive (mentioning the order in each subsequent section).
With that in mind, I'm of two minds. I think the documentation should be left as is, however, I recognize that if you navigate straight to the section you linked to, the section I linked to could be overlooked. Is there something that you think would have made things more clear on your read?
@justinretzolk I believe, the sections should have a link to the top of the configuration document and mention that explicitly. So you will understand the precedence for exact options if you navigate into in directly. And you can easily navigate to the section which will describe behaviour in general.
Documentation Link
https://registry.terraform.io/providers/hashicorp/aws/latest/docs#shared-configuration-and-credentials-files
Description
If both
profle
option andAWS_PROFILE
environment variable were configured. Which one take precedence?References
No response
Would you like to implement a fix?
None