forked from turnerlabs/terraform-ecs-fargate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
53 lines (43 loc) · 983 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
48
49
50
51
52
53
terraform {
required_version = ">= 0.13"
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 4.0.0, < 5.0.0"
}
}
backend "s3" {
region = "us-east-1"
profile = ""
bucket = ""
key = "dev.terraform.tfstate"
}
}
# The AWS Profile to use
variable "aws_profile" {
}
provider "aws" {
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
}