Created
April 25, 2023 01:51
-
-
Save hendrixroa/d0ed40d1ef311c785a878cf20f2e71c1 to your computer and use it in GitHub Desktop.
Terraform template file to configure dynamically the values in a JSON template definition
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data "template_file" "main" { | |
template = file("${path.module}/task_definition.json") | |
vars = { | |
ecr_image_url = var.repo_url | |
name = var.app | |
name_index_log = lower(var.app) | |
prefix_logs = var.prefix_logs | |
region = var.region | |
environment = jsonencode(concat(local.main_environment, var.environment_list)) | |
port = var.listen_port | |
listen_port = var.listen_port | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment