This Module used to create a new Nat Gateway within VPC on Alibaba Cloud.
As an Internet gateway, a NAT Gateway requires public IP addresses to function. After creating a NAT Gateway, this module supports to create and associate one or more Elastic IP Addresses (EIPs) with the NAT Gateway.
These types of resources are supported:
For Terraform 0.12.
Create a new Nat Gateway and bind two EIPs.
module "nat-gateway" {
source = "terraform-alicloud-modules/nat-gateway/alicloud"
region = var.region
create = true
vpc_id = "vpc-123435"
name = "nat-gateway-foo"
// Create eip and bind them with nat gateway
create_eip = true
number_of_eip = 2
eip_name = "eip-nat-foo"
}
Set an existing nat gateway and bind two eip
module "existing" {
source = "terraform-alicloud-modules/nat-gateway/alicloud"
region = var.region
use_existing_nat_gateway = true
existing_nat_gateway_id = "nat-1232456"
// Create eip and bind them with nat gateway
create_eip = true
number_of_eip = 2
eip_name = "eip-nat-bar"
}
- This module using AccessKey and SecretKey are from
profile
andshared_credentials_file
. If you have not set them yet, please install aliyun-cli and configure it.
If you have any problems when using this module, please opening a provider issue and let us know.
Note: There does not recommend to open an issue on this repo.
Created and maintained by He Guimin(@xiaozhu36, heguimin36@163.com)
Apache 2 Licensed. See LICENSE for full details.