【发布时间】:2021-07-13 07:36:58
【问题描述】:
我正在尝试使用 terraform 将我的 AWS ECR 存储库复制到同一账户中的多个区域。我从 AWS 控制台手动尝试它工作正常,但从 terraform 中,我无法找到解决方案。 我尝试了什么: 我尝试为名为 replicate_region 的区域创建一个单独的变量,并尝试在列表中提供该区域,但它不断给我一个名为
的错误属性“区域”的值不合适:需要字符串。
这里是变量代码:
variable "replicate_region" {
description = "value"
type = list(string)
}
这是我的 ecr 复制代码:
resource "aws_ecr_replication_configuration" "replication" {
replication_configuration {
rule {
destination {
region = var.replicate_region
registry_id = "xxxxxxxx"
}
}}}
谁能帮帮我?
谢谢,
【问题讨论】:
标签: amazon-web-services terraform amazon-ecr terragrunt elastic-container-registry