arvancloud_vpc_network_gateway (Resource)
Manages a VPC Network Gateway (NAT Gateway) that provides internet access for resources in a VPC.
Example Usage
# Create a network gateway for a VPC in a specific availability zone.
resource "arvancloud_vpc_network_gateway" "example" {
vpc_id = arvancloud_vpc.example.id
availability_zone = "ir-central1-a"
}
# Create network gateways in multiple availability zones.
resource "arvancloud_vpc_network_gateway" "az_a" {
vpc_id = arvancloud_vpc.app_vpc.id
availability_zone = "ir-central1-a"
}
resource "arvancloud_vpc_network_gateway" "az_b" {
vpc_id = arvancloud_vpc.app_vpc.id
availability_zone = "ir-central1-b"
}
# Output network gateway attributes.
output "example_ngw_id" {
value = arvancloud_vpc_network_gateway.example.id
}
output "example_ngw_ip" {
value = arvancloud_vpc_network_gateway.example.ip_address
}
output "example_ngw_region" {
value = arvancloud_vpc_network_gateway.example.region
}
output "example_ngw_created_at" {
value = arvancloud_vpc_network_gateway.example.created_at
}
Schema
Required
availability_zone(String) Availability zone where the network gateway will be created (e.g.,ir-central1-a). Changing this value forces a new resource to be created.vpc_id(String) ID of the VPC this network gateway belongs to. Changing this value forces a new resource to be created.
Read-Only
created_at(String) Timestamp when the network gateway was created.id(String) Unique identifier of the network gateway assigned by the API.ip_address(String) Public IP address assigned to the network gateway.region(String) Region where the network gateway is located.
Import
Import is supported using the following syntax:
terraform import arvancloud_vpc_network_gateway.example ngw-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx