Skip to main content
Providers

NatGateway

A resource of the AWS provider, version 0.3.0, in its Networking group. Import it with:

import NatGateway from "aws/networking"

Example

resource NatGateway example {
    subnetId         = "example-value"
    allocationId     = "example-value"
    connectivityType = "public"
    tags             = "..."
}

Properties

Set by your code in the resource block. A required one must be set; any other you leave out takes the value under Default, if it has one.

NameTypeDefaultRequiredDescription
subnetIdstring—NoThe subnet ID where the NAT gateway will be created
allocationIdstring—NoThe allocation ID of the Elastic IP for public NAT gateway
connectivityTypestring"public"NoThe connectivity type for the NAT gateway Allowed: "public", "private"
tagsobject—NoTags to apply to the NAT gateway

Set by AWS after the resource is created: your code can read them but not set them. An importable one identifies an existing resource.

NameTypeImportableDescription
natGatewayIdstringNoThe NAT gateway ID assigned by AWS
statestringNoThe current state of the NAT gateway
vpcIdstringNoThe VPC ID that contains the NAT gateway
publicIpstringNoThe public IP address associated with the NAT gateway
privateIpstringNoThe private IP address of the NAT gateway

On this page