terraform - 强制 Terraform 使用特定区域进行数据收集
问题描述
目前正在使用 AWS Organizations 在 AWS 中国开展一个项目。根据 AWS Support,Organizations 终端节点仅存在于 cn-northwest-1,但我们正在部署到 cn-north-1。
我正在尝试将数据源拉入(aws_organizations_organization)。
我设置了以下 AWS 提供商:
provider "aws" {
version = "3.4.0"
region = "cn-north-1"
}
provider "aws" {
version = "3.4.0"
region = "cn-northwest-1"
alias = "northwest"
}
我正在像这样提取数据:
data "aws_organizations_organization" "org" {
provider = aws.northwest
}
Error: error listing AWS Service Access for Organization (redacted): UnsupportedAPIEndpointException: This API endpoint is not supported in this region
resource "aws_organizations_organizational_unit" "core" {
name = "core"
parent_id = data.aws_organizations_organization.org.roots.0.id
}
解决方案
推荐阅读
- postgresql - 使用 3 IN 的查询在表中索引什么?
- php - 如何每周按用户 ID 对表列求和并在 PHP 中回显
- amazon-web-services - AWS Ubuntu Server 已满,但为什么呢?
- javascript - 打字稿标记的联合未在 switch 语句中进行类型检查
- html - 如何在同一行添加一些东西?
- asp.net - 将 https://www 重定向到 https://no-www 网络配置 您的连接不安全
- angular - 路由守卫方法破坏路由
- wagtail - 向 Wagtail Admin 添加自定义操作按钮
- node.js - 节点模块路径执行 Windows 10
- r - 压力和温度随深度的导数