使用 Terraform 更改 AWS VPC 内置本地路由 table 和网络接口

Changing AWS VPC Built in local route table & network interface with Terraform

我已经使用 Terraform 创建了自己的 VPC,但是无法编辑创建资源的某些参数,例如

  1. 我找不到负责路由 table 的属性,它未命名并用于本地连接 (10.0.0.0/16 Local)(Main route table)
  2. 此外,当我创建 EIP 时,它使用 ENI(接口),但它也不在我的控制范围内

也许有人已经做过类似的事情,如果能提供任何帮助,我将不胜感激

P.S。 Terraform 已经创建了 vpc、子网、路由 tables、igw、nat .....

I can not find the attribute, which is responsible for route table which is unnamed and uses for local connection (10.0.0.0/16 Local)(Main route table)

无法编辑或删除 10.0.0.0/16 Local。它始终存在于您的路由表中,因此没有更改它的属性。

Also, when I'm creating a EIP it uses ENI (Interface), however it also not in my control

不知道你这是什么意思。 EIP 本身没有 ENI。 EIP 必须附加到 ENI 才能工作。如果您将其附加到 NAT 网关,则使用的 ENI 是 AWS 管理的 ,而不是您的。所以你无法控制它。

另一方面,如果您将 EIP 附加到您自己的 EC2 实例的 ENI,您可以选择管理 ENI。