tmknom / terraform-aws-codedeploy-for-ecs

Terraform module which creates CodeDeploy for ECS resources on AWS.
Apache License 2.0
45 stars 51 forks source link

How is the code deploy being triggered? #19

Open JacobWeyer opened 4 years ago

JacobWeyer commented 4 years ago

After the initial deploy are you redeploying the terraform or doing a code deploy command?

thatbeardo commented 4 years ago

@JacobWeyer, I have the same question. I believe this module will only create the CodeDeploy resource(s) once and the triggering mechanism is left upto you. The best I can think of is to use a Terraform local exec resource to manually run an aws-cli deploy command to trigger the actual deployment. Let me know if you have any findings that suggest otherwise!

spatel96 commented 4 years ago

@JacobWeyer @thatbeardo

I've used this module in conjunction with an AWS ECS CodePipeline module which is triggered upon artifacts changes.

There are 3 of these artifacts:

Terraform generates these artifacts from source (checked in template files) and populates the templates using interpolation for various environment variables. This is then zipped up and uploaded to S3 for the appspec and task definition.

The container image tag is simply listening for a specific tag to be pushed to an ECR Repo. For example master-ci for a CI pipeline.

paambaati commented 1 year ago

This has been very useful to me – https://www.scalefactory.com/blog/2023/03/07/using-codedeploy-with-terraform-and-github-actions/