From 1ca839899a0317dc6a48d481fb3555219bc24917 Mon Sep 17 00:00:00 2001 From: Matheus Jacques Date: Tue, 12 Sep 2023 11:40:33 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20chore(main.tf):=20use=20variable?= =?UTF-8?q?=20for=20AWS=20region=20to=20improve=20flexibility=20and=20reus?= =?UTF-8?q?ability=20=F0=9F=94=A7=20chore(main.tf):=20use=20variables=20fo?= =?UTF-8?q?r=20instance=20type,=20manager=20count,=20and=20worker=20count?= =?UTF-8?q?=20to=20improve=20configurability=20and=20scalability?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/scripts/terraform/main.tf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deploy/scripts/terraform/main.tf b/deploy/scripts/terraform/main.tf index 76c8dcb58..8c103d00b 100644 --- a/deploy/scripts/terraform/main.tf +++ b/deploy/scripts/terraform/main.tf @@ -7,7 +7,7 @@ terraform { } provider "aws" { - region = "us-east-1" # Choose the region as needed + region = var.region # Choose the region as needed } module "docker-swarm" { @@ -16,9 +16,9 @@ module "docker-swarm" { vpc_id = aws_vpc.swarm-vpc.id subnet_id = aws_subnet.swarm-public-subnet.id security_group = aws_security_group.swarm-sg.id - instance_type = "t2.micro" # Choose the instance type as needed - manager_count = 1 - worker_count = 10 # This is the number of services in the docker-compose.yml file + instance_type = var.instance_type # Choose the instance type as needed + manager_count = var.manager_count + worker_count = var.worker_count # This is the number of services in the docker-compose.yml file } resource "aws_key_pair" "swarm-key" {