Home > Back-end >  Passing additional parameters while creating s3 bucket
Passing additional parameters while creating s3 bucket

Time:02-17

Is there a way to pass additional parameters to the AWS API when creating aws_s3_bucket resource, namengly CreateBucketConfiguration/LocationConstraint ?

CodePudding user response:

You can't do this directly, but you can obtain the same effect through provider alias set to a given region:

provider "aws" {  
   alias  = "west"  
   region = "us-west-2"
}


resource "aws_s3_bucket" "mybucket" {  
   provider = aws.west
   #...
}
  • Related