-
Notifications
You must be signed in to change notification settings - Fork 25
/
main.tf
47 lines (38 loc) · 893 Bytes
/
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
terraform {
required_version = ">= 0.12"
backend "s3" {
region = "us-east-1"
profile = ""
bucket = ""
key = "dev.terraform.tfstate"
}
}
# The AWS Profile to use
variable "aws_profile" {
}
provider "aws" {
version = ">= 1.53.0"
region = var.region
profile = var.aws_profile
}
# output
# Command to view the status of the Fargate service
output "status" {
value = "fargate service info"
}
# Command to deploy a new task definition to the service using Docker Compose
output "deploy" {
value = "fargate service deploy -f docker-compose.yml"
}
# Command to scale up cpu and memory
output "scale_up" {
value = "fargate service update -h"
}
# Command to scale out the number of tasks (container replicas)
output "scale_out" {
value = "fargate service scale -h"
}
# Command to set the AWS_PROFILE
output "aws_profile" {
value = var.aws_profile
}