Mustafa
Mustafa

Reputation: 33

All instances are launching in private subnet

I am working to build an all in one small use case to demonstrate major compute resources integrated using terraform. However, all my ec2 instances are launching into private subnets. I have tried multiple ways but seems like still something is missing.

A short version of demo repo is available at https://github.com/smustafa75/vpc_private_link

Please guide here.

Upvotes: 1

Views: 49

Answers (1)

Ervin Szilagyi
Ervin Szilagyi

Reputation: 16795

In your network module you have the following output:

output "public_net" {
  value = aws_subnet.tf_private_subnet.*.id
}

I believe you wanted to ouput this IDs of the public subnets (aws_subnet.tf_public_subnet.*.id) in this case.

You have the same output for the private_net, which I assume is correct.

Upvotes: 3

Related Questions