Skip to content

Commit

Permalink
fix: added igw
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleyrudland committed Mar 20, 2023
1 parent 09c3848 commit 0aed685
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down Expand Up @@ -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": [
{
Expand Down

0 comments on commit 0aed685

Please sign in to comment.