-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
48 lines (45 loc) · 1.29 KB
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
provider "aws" {
region = var.aws_region
default_tags {
tags = {
Owner = "Segfy"
CreteadBy = "Matheus Soares"
Creator = "Dati"
Dati-ticket = "46794"
Provisioned = "Terraform"
Sustained = "Terraform"
Environment = var.env
}
}
}
terraform {
required_version = ">= 1.1.0"
backend "s3" {}
}
module "Segfy-budget-ecr" {
source = "./modules/ecr-module"
name = "Segfy-budget-${var.env}"
image_tag_mutability = "MUTABLE"
scan_on_push = false
}
module "Segfy-budget" {
source = "./modules/ecs-service-no-scaling"
project_name = "Segfy-budget-${var.env}"
task_name = "Segfy-budget-${var.env}"
cluster_id = var.cluster_id
alb_sg_id = var.alb_sg_id
listener_arn = var.listener_arn
arn_loadbalancer = var.arn_loadbalancer
health_check_path= "/health"
container_port = "80"
network_mode = "awsvpc"
task_cpu = "256"
task_memory = "512"
desired_count = "1"
host_header = ["Segfy-budget.${var.domain_name}"]
env = var.env
lb_protocol = "HTTP"
vpc_id = var.vpc_id
private_subnets = var.private_subnets
image_url = var.image_url
}