Home > Software engineering >  Dynamically create AWS S3 buckets in multiple regions
Dynamically create AWS S3 buckets in multiple regions

Time:02-11

Is there a way to create terraform aws_s3_bucket resources dynamically in different regions? Argument region is no longer supported, creating provider aliases in different regions dynamically is also not supported. Is there a way to do this?

CodePudding user response:

Yes - you can use Provider Aliasing and regions are reported as supported per the AWS provider documentation

I suggest keeping your terraform cleanly modularized when using aliasing to keep the copy/paste code per region to a minimum

Check out this other answer already addressing this for an implementation example (the latest answer 2021)

  • Related