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.
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