This is my code:


Is it possible to to configure NAT Gateway without using Internet Gateway with Terraform?
The code which I wrote for deploying the cod with terraform but I keep getting this issue:

This is the error I get:
This is my code:


Is it possible to to configure NAT Gateway without using Internet Gateway with Terraform?
The code which I wrote for deploying the cod with terraform but I keep getting this issue:

This is the error I get:
Copyright © 2021 Jogjafile Inc.
Is it possible? Yes. Is it what you need? It depends on what the purpose of your NAT Gateway is.
The AWS NAT Gateways documentation explains that there are two different types of NAT Gateways:
For private gateways you don't need an Internet Gateway. With Terraform, you can create a private gateway by adding the
connectivity_type: "private"argument to youraws_nat_gateway.However, for public gateways, you do need an Internet Gateway. If you didn't have one, how else would you route traffic to the internet?