描述
腾讯云 NAT 网关 - SNAT 转发规则,产品介绍
示例
resource "tencentcloud_nat_gateway_snat" "subnet_snat" {nat_gateway_id = tencentcloud_nat_gateway.my_nat.idresource_type = "SUBNET"subnet_id = tencentcloud_subnet.subnet.idsubnet_cidr_block = tencentcloud_subnet.subnet.cidr_blockdescription = "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 SNAT 资源类型
枚举值: 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 | 资源创建时间 |