remove template_file provider

This commit is contained in:
Edward Viaene
2022-05-09 13:58:40 -04:00
parent 7b33450e20
commit 2a80e889ce
3 changed files with 10 additions and 20 deletions
+4 -9
View File
@@ -1,16 +1,11 @@
# app
data "template_file" "myapp-task-definition-template" {
template = file("templates/app.json.tpl")
vars = {
REPOSITORY_URL = replace(aws_ecr_repository.myapp.repository_url, "https://", "")
APP_VERSION = var.MYAPP_VERSION
}
}
resource "aws_ecs_task_definition" "myapp-task-definition" {
family = "myapp"
container_definitions = data.template_file.myapp-task-definition-template.rendered
container_definitions = templatefile("templates/app.json.tpl", {
REPOSITORY_URL = replace(aws_ecr_repository.myapp.repository_url, "https://", "")
APP_VERSION = var.MYAPP_VERSION
})
}
resource "aws_ecs_service" "myapp-service" {