Skip to content

Commit

Permalink
changed flask run command
Browse files Browse the repository at this point in the history
  • Loading branch information
proquickly committed Nov 19, 2024
1 parent ebfa91f commit afa6a93
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ provider "aws" {
}

resource "aws_instance" "py_server" {
ami = "ami-0709112b97e5accb1"
ami = "ami-0c55b159cbfafe1f0"
instance_type = "t2.micro"

user_data = <<-EOF
Expand All @@ -27,8 +27,7 @@ user_data = <<-EOF
def hello():
return "Hello from Python!"
if __name__ == '__main__':
app.run(host='0.0.0.0', port=5000)
app.run(host='0.0.0.0', port=5000)
EOL
# Change to the application directory and run the app
Expand Down Expand Up @@ -62,7 +61,3 @@ resource "aws_security_group" "allow_http" {
cidr_blocks = ["0.0.0.0/0"]
}
}

output "public_ip" {
value = aws_instance.py_server.public_ip
}

0 comments on commit afa6a93

Please sign in to comment.