-
Notifications
You must be signed in to change notification settings - Fork 217
env var AWS_REGION - will this requirement ever go away?? #143
Comments
As you note the Some discussions are happening around #132 and #117 which addresses some of that. Once this is clearer we'll provide some examples of usage and more discussion of context. There are also a number of performance optimisations that are possible, the first batch in #102. |
Two follow on questions
|
In addition, whether configured via an environment variable or a config setting we should allow you to provide a list of regions. We definitely want to support graphs of resources across regions, but it's balancing that with the performance characteristics. |
I wanted to pick up the discussion on point 2 above regarding the use of a puppet global variable in addition to or instead of an environment variable. I'm just getting back into writing AWS infrastructure code intended to be run on an arbiter during regular puppet agent runs and those runs can't access environment variables. After unsuccessfully trying to figure out how to consume variables set in the Puppet Enterprise console in aws.rb (which is run completely agent-side), I decided to inject the values as local facts from the arbiter node itself. That works. Before I put in a pull request to add Facter lookups for the region and proxy variables, I was wondering if anyone's made progress (or would know how to) consume PE console variables for this purpose. Using Facter for this seems hackish, but since I can manage the disk-based facts as part of the arbiter's resources it's acceptable to me. |
+1 for global variable option, preferably by honouring value set in ~/.aws/config |
Just to note that you can now use a config file in Puppet's confdir, specifically called It doesn't use |
Hi @garethr, Thanks that is perfect! Peter |
tldr - I am curious if the AWS_REGION is a legacy code artifact that will eventually go away. My question is if the provider allows you to specify a region in the puppet manifest, why doesn't the provider just default to that region?
I think that this section a note on regions needs to have 20 foot sized flashing text that reads - "here be dragons - set this environment variable or add a large delay for each aws puppet type processed".
I incorrectly assumed (up until tonight) that by setting the region in the puppet manifest for each aws type that was all I needed to do.
While trying to understand some of the provider code I stumbled on puppet_x/puppetlabs/aws.rb#L26-L32 which appears to be called for every provider (or at least the ones I checked). For example ec2_vpc_routetable.
Don't believe me, unset the environment variable and run any of the examples. For example:
Essentially if the AWS_REGION environment variable is not set all valid regions will be returned to the provider, and than the provider will iterate across every region looking for valid information.
The text was updated successfully, but these errors were encountered: