-
-
Save gersonfa/7f6e2b6888bece03061bc9a9812fb5ea to your computer and use it in GitHub Desktop.
deploy_codedeploy.tf
This file contains hidden or 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
// Creates a new deployment on every change to the task-definition ARN | |
resource "null_resource" "redeploy" { | |
triggers = { | |
task_definition_arn = var.task_definition_arn | |
} | |
provisioner "local-exec" { | |
command = "aws deploy create-deployment --application-name $app_name --deployment-group-name $deployment_group_name --revision "$revision"" | |
environment = { | |
app_name = var.app_name | |
deployment_group_name = "${var.app_name}-deployment-group" | |
revision = data.template_file.deployment.rendered | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment