Closed vim-diesel closed 4 years ago
curl fails to work like in the book
provider "aws" { version = "~> 2.0" region = "us-east-1" } resource "aws_instance" "example" { ami = "ami-0fc61db8544a617ed" instance_type = "t2.micro" vpc_security_group_ids = [aws_security_group.inst.id] user_data = <<-EOF #!/bin/bash echo "Hello, world" > index.html nohup busybox https -f -p 8080 & EOF } resource "aws_security_group" "inst" { name = "terra_inst" ingress { from_port = 8080 to_port = 8080 protocol = "tcp" cidr_blocks =["0.0.0.0/0"] } }
curl http://54.152.181.11:8080 curl: (7) Failed to connect to 54.152.181.11 port 8080: Connection refused
Turns out this AMI is for Amazon Linux 2. Where do I find the amis? Book fails to mention this.
curl fails to work like in the book