What design patterns is everybody using for passin...
# python
e
What design patterns is everybody using for passing things like AWS region to dynamic providers? I'm using boto3 to stand up some resources not covered by the TF provider and need to make sure they're using the right region. Things I've considered: • Set the environment variable boto3 pulls from to set default region (
AWS_REGION
) • Pull from the stack config • Set a global variable • Add a 'region' parameter to every dynamic provider • Extend ResourceOptions, adding a 'region' parameter, and passing it to my provider in my resource constructor Unfortunately all of these are either have a lot of coupling or add a decent amount of boilerplate code to each provider.