简体   繁体   English

创建 s3 存储桶时传递附加参数

[英]Passing additional parameters while creating s3 bucket

Is there a way to pass additional parameters to the AWS API when creating aws_s3_bucket resource, namengly CreateBucketConfiguration/LocationConstraint ?在创建aws_s3_bucket资源时,有没有办法将其他参数传递给 AWS API,即CreateBucketConfiguration/LocationConstraint

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM