对 terraform 相对较新,目前正在尝试在 AWS 中构建云基础设施。\n当我使用资源aws_route_table ( https://registry.terraform.io/providers/ ) 文档中的官方示例(略有更改)时,出现错误hashcorp/aws/latest/docs/resources/route_table)
\nresource "aws_route_table" "prod-route-table" {\n vpc_id = aws_vpc.prod-vpc.id\n\n route = [{\n # Route all Traffic to the internet gateway\n cidr_block = "0.0.0.0/0"\n gateway_id = aws_internet_gateway.gw.id\n },{\n ipv6_cidr_block = "::/0"\n gateway_id = aws_internet_gateway.gw.id\n }]\n \n}\n
Run Code Online (Sandbox Code Playgroud)\n我收到以下错误消息
\nError: Incorrect attribute value type\n\xe2\x94\x82 Inappropriate value for attribute "route": element 0: attributes "carrier_gateway_id",\n\xe2\x94\x82 "destination_prefix_list_id", "egress_only_gateway_id", "instance_id", "ipv6_cidr_block",\n\xe2\x94\x82 "local_gateway_id", "nat_gateway_id", "network_interface_id", "transit_gateway_id", "vpc_endpoint_id",\n\xe2\x94\x82 and "vpc_peering_connection_id" are required.\n
Run Code Online (Sandbox Code Playgroud)\n添加所有这些属性可以解决该错误,但这会极大地破坏代码。\n以不同方式编写它(请参阅下文)不会导致任何错误,terraform AWS 文档是否不正确,因为它们清楚地说明了第一种编写方式?
\n …我当前正在 AWS SSO 中配置权限集,并在托管服务的默认配额中运行。我收到以下消息:
您已达到 AWS 托管策略的默认配额。默认情况下,每个权限集最多可以附加 10 个 AWS 托管策略。您可以使用服务配额请求将“附加到 IAM 角色的托管策略”的配额增加到 20。
关于如何编辑 IAM 服务配额的任何想法