alibabacloud-automation / terraform-alicloud-nat-gateway

Terraform module which creates NAT gateway and route entry resources on Alibaba Cloud
https://registry.terraform.io/modules/terraform-alicloud-modules/nat-gateway/alicloud/latest
MIT License
2 stars 19 forks source link

The module not supporting latest TF resource for enhanced net_type #7

Open superzc-github opened 3 years ago

superzc-github commented 3 years ago

The module not supporting latest TF resource for enhanced net_type

--Issue Message of TF Apply-- Message: Standard NAT gateways are no longer offered. You can create enhanced NAT gateways and set the correct natType.

MindPhaser34 commented 2 years ago

btw, you could specify it like this:

resource "alicloud_nat_gateway" "default" {
  vpc_id      = concat(alicloud_vpc.default.*.id, [""])[0]
  name        = var.nat_name
  nat_type    = var.nat_type
  payment_type  = var.payment_type
  vswitch_id  = alicloud_vswitch.default[count.index].id
  depends_on       = [alicloud_vswitch.default] 
}