Closed Dhina-test closed 1 year ago
Use subnet_id
as suggested in the error message. See examples in the readme.
Yes @antonbabenko , but i am trying add more than one subnets. and here i am using subnet_id instead of subnet_ids In may case i defined subnet details in variable section for vpc
Then i will be calling those in ec2 module from vpc module outputs
and now error in terraform validate
Can you help for this ?
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Hi , here i am sharing my ec2 module block and error can you help to solve this ?
`module "private_ec2" { source = "terraform-aws-modules/ec2-instance/aws" version = "4.2.0"
name = "private-ec2-ins"
ami = data.aws_ami.ubuntu.id instance_type = var.instance_type key_name = var.key_pair
monitoring = true
vpc_security_group_ids = [module.bastion_sg.security_group_id] subnet_ids = [module.vpc.private_subnets[0], module.vpc.private_subnets[1]] user_data = file("${path.module}/install.sh")
tags = { Terraform = "true" Environment = "dev" } }`
and error in terraform validate