一、描述
腾讯云 NAT 网关 – SNAT 转发规则,产品介绍
二、示例
resource "tencentcloud_nat_gateway_snat" "subnet_snat" { nat_gateway_id = tencentcloud_nat_gateway.my_nat.id resource_type = "SUBNET" subnet_id = tencentcloud_subnet.subnet.id subnet_cidr_block = tencentcloud_subnet.subnet.cidr_block description = "terraform test" public_ip_addr = [ tencentcloud_eip.eip_example1.public_ip, tencentcloud_eip.eip_example2.public_ip, ]}
三、参数说明
| 类型 | 名称 | 数据类型 | 说明 |
| 必填 | region | string | 地域,如:ap-guangzhou,默认使用 provider 中定义的 region 也可以在 resource 中指定地域,覆盖默认设置 |
| 必填 | availability_zone | string | 可用区 |
| 必填 | description | string | SNAT 规则描述 |
| 必填 | nat_gateway_id | string | NAT 网关 ID |
| 必填 | public_ip_addr | string[] | 弹性 IP 地址池示例值:['180.12.59.43'] |
| 必填 | resource_type | enum | 资源类型,示例值:SUBNET枚举值:SUBNET:子网NETWORKINTERFACE:云服务器USERDEFINED:自定义 |
| 可选 | count | int | 资源数量,默认为 1 如果为 0 则不创建资源 |
| 可选 | activity_id | int | 计费活动 ID,保留字段 |
| 可选 | instance_id | string | 云服务器实例 ID/子网 ID当 resource_type 为 NETWORKINTERFACE 时,该字段为云服务器实例 ID,必填当 resource_type 为 SUBNET 时,该字段为子网ID,必填 |
| 可选 | instance_private_ip_addr | string | 源 IP/源网段(云服务器内网 IP 地址/自定义网段)当 resource_type 为 NETWORKINTERFACE 时,该字段为云服务器内网 IP 地址,必填示例值:172.168.100.0/24 |
| 可选 | subnet_cidr_block | string | 源 IP/源网段(子网 CIDR)当 resource_type 为 SUBNET 时,该字段为子网 CIDR,必填 |
| 可选 | subnet_id | string | 子网 ID当 resource_type 为 SUBNET 时,该字段为子网 ID,必填 |
| 生成 | id | string | 资源实例 ID |
| 生成 | create_time | string | 资源创建时间 |