Skip to content

Latest commit

 

History

History
106 lines (81 loc) · 1.7 KB

aws_nat_gateway.md

File metadata and controls

106 lines (81 loc) · 1.7 KB

aws_nat_gateway

back

Index

Terraform

terraform {
  required_providers {
    aws = ">= 3.35.0"
  }
}

top

Example Usage

module "aws_nat_gateway" {
  source = "./modules/aws/r/aws_nat_gateway"

  # allocation_id - (required) is a type of string
  allocation_id = null
  # subnet_id - (required) is a type of string
  subnet_id = null
  # tags - (optional) is a type of map of string
  tags = {}
}

top

Variables

variable "allocation_id" {
  description = "(required)"
  type        = string
}

variable "subnet_id" {
  description = "(required)"
  type        = string
}

variable "tags" {
  description = "(optional)"
  type        = map(string)
  default     = null
}

top

Resource

resource "aws_nat_gateway" "this" {
  # allocation_id - (required) is a type of string
  allocation_id = var.allocation_id
  # subnet_id - (required) is a type of string
  subnet_id = var.subnet_id
  # tags - (optional) is a type of map of string
  tags = var.tags
}

top

Outputs

output "id" {
  description = "returns a string"
  value       = aws_nat_gateway.this.id
}

output "network_interface_id" {
  description = "returns a string"
  value       = aws_nat_gateway.this.network_interface_id
}

output "private_ip" {
  description = "returns a string"
  value       = aws_nat_gateway.this.private_ip
}

output "public_ip" {
  description = "returns a string"
  value       = aws_nat_gateway.this.public_ip
}

output "this" {
  value = aws_nat_gateway.this
}

top