-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
33 lines (27 loc) · 916 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
variable "cluster" {
description = "The ECS cluster that the service is deployed to."
type = "string"
}
variable "service" {
description = "The name of the ECS service."
type = "string"
}
variable "taskdef" {
description = "The task definition ARN that the service is being updated to."
type = "string"
}
data "aws_region" "current" {
}
data "aws_caller_identity" "current" {}
resource "null_resource" "ecs_update_monitor" {
triggers {
cluster = "${var.cluster}"
service = "${var.service}"
taskdef = "${var.taskdef}"
caller_arn = "${data.aws_caller_identity.current.arn}"
region = "${data.aws_region.current.name}"
}
provisioner "local-exec" {
command = "${path.module}/provision.sh '${path.module}' '${var.cluster}' '${var.service}' '${var.taskdef}' '${data.aws_region.current.name}' '${data.aws_caller_identity.current.arn}'"
}
}