Questions tagged [aws-subnets]

3 questions
0
votes
1 answer

Unable to connect from my local system to ec2 instance created by terraform script

Following is the source code: variable "ec2_instance_type_name" { type = string default = "t2.nano" } terraform { required_providers { aws = { source = "hashicorp/aws" version = "~> 3.27" } …
0
votes
1 answer

Best practice put nginx + django in AWS subnet private?public?

I want to put the fargate container which contains django + nginx However what subnet should be used for? At first I put this in public subnet, of course it works well. However, is it possible to put this in private subnet with NAT gateway? If so,…
0
votes
1 answer

Terraform get subnet id by it's CIDR block

I have a list of CIDRs for my subnets and want to get their ids. Is it possible to do with terraform? my_subnets = ["212.12.1.0/24", "212.12.2.0/24", "212.12.3.0/24"] I know VPC id as well, how to get an array of subnets ids via data source? The…