diff --git a/main.tf b/main.tf index 9e1323e..2a38f15 100644 --- a/main.tf +++ b/main.tf @@ -27,17 +27,18 @@ provider "aws" { region = "us-east-1" } -resource "aws_ecr_repository" "app_ecr_repo" { - name = "example_app" -} - resource "aws_vpc" "example_vpc" { cidr_block = "10.0.0.0/16" } +resource "aws_internet_gateway" "igw" { + vpc_id = aws_vpc.example_vpc.id +} + resource "aws_subnet" "example_subnet_1" { cidr_block = "10.0.1.0/24" vpc_id = aws_vpc.example_vpc.id + depends_on = [aws_internet_gateway.igw] } resource "aws_subnet" "example_subnet_2" { @@ -150,7 +151,7 @@ resource "aws_ecs_task_definition" "example_task_definition" { [ { "name": "example-container", - "image": "${aws_ecr_repository.app_ecr_repo.repository_url}", + "image": "939628944121.dkr.ecr.us-east-1.amazonaws.com/example_app:latest", "essential": true, "portMappings": [ {