Skip to content

Terraform module which creates NAT gateway and route entry resources on Alibaba Cloud

License

Notifications You must be signed in to change notification settings

antonbabenko/terraform-alicloud-nat-gateway

 
 

Alibaba Cloud Nat Gateway Terraform Module
terraform-alicloud-nat-gateway

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:

Terraform versions

For Terraform 0.12.

Usage

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"
}

Examples

Notes

  • This module using AccessKey and SecretKey are from profile and shared_credentials_file. If you have not set them yet, please install aliyun-cli and configure it.

Submit Issues

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.

Authors

Created and maintained by He Guimin(@xiaozhu36, heguimin36@163.com)

License

Apache 2 Licensed. See LICENSE for full details.

Reference

About

Terraform module which creates NAT gateway and route entry resources on Alibaba Cloud

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HCL 100.0%