oci_core_nat_gateway

This resource provides the Nat Gateway resource in Oracle Cloud Infrastructure Core service.

Creates a new NAT gateway for the specified VCN. You must also set up a route rule with the NAT gateway as the rule’s target. See Route Table.

Example Usage

resource "oci_core_nat_gateway" "test_nat_gateway" {
	#Required
	compartment_id = var.compartment_id
	vcn_id = oci_core_vcn.test_vcn.id

	#Optional
	block_traffic = var.nat_gateway_block_traffic
	defined_tags = {"Operations.CostCenter"= "42"}
	display_name = var.nat_gateway_display_name
	freeform_tags = {"Department"= "Finance"}
	public_ip_id = oci_core_public_ip.test_public_ip.id
	route_table_id = oci_core_route_table.test_route_table.id
}

Argument Reference

The following arguments are supported:

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

Attributes Reference

The following attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain operations: * create - (Defaults to 20 minutes), when creating the Nat Gateway * update - (Defaults to 20 minutes), when updating the Nat Gateway * delete - (Defaults to 20 minutes), when destroying the Nat Gateway

Import

NatGateways can be imported using the id, e.g.

$ terraform import oci_core_nat_gateway.test_nat_gateway "id"