Fix #288: not able to use AWS Profiles #310
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Many companies use the AWS best practice of requiring users to assume into a role that grants access to a given account representing an environment (dev, stage, prod etc). When I tried to spin up a cluster using the jx3-terraform-eks repo, it failed because in this module, there is a direct call to AWS that doesn't honor the profile I set in the jx3-terraform-eks terraform variables. This PR adds a conditional flag on the only direct AWS call I could find. Please point out if there are more.
Special notes for the reviewer(s)
In theory this should be backwards compatible because if the variable isn't set the flag wouldn't be added. If this is pulled in I will need to make a separate PR in jx3-terraform-eks for forwarding the profile to this modules, but first things first.
Which issue this PR fixes
fixes #288