Skip to content

Commit

Permalink
Fix Terraform Plan
Browse files Browse the repository at this point in the history
  • Loading branch information
h2ouw8n4 committed Nov 6, 2023
1 parent 3a52973 commit 8143bb4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions fargate.tf
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,16 @@ resource "aws_ecs_cluster" "this" {
name = "${var.prefix}-${var.environment}"
}

resource "aws_ecs_cluster_capacity_providers" "cluster" {
cluster_name = "${var.prefix}-${var.environment}"

capacity_providers = ["FARGATE_SPOT", "FARGATE"]

default_capacity_provider_strategy {
capacity_provider = "FARGATE_SPOT"
}
}

resource "aws_security_group" "wordpress" {
name = "${var.prefix}-wordpress-${var.environment}"
description = "Fargate wordpress"
Expand Down Expand Up @@ -155,6 +165,12 @@ resource "aws_ecs_task_definition" "this" {
requires_compatibilities = ["FARGATE"]
cpu = var.task_cpu
memory = var.task_memory

runtime_platform {
cpu_architecture = "ARM64" # Indicate Graviton2 processor architecture
operating_system_family = "LINUX"
}

container_definitions = <<CONTAINER_DEFINITION
[
{
Expand Down

0 comments on commit 8143bb4

Please sign in to comment.