This package is ECS Service - Terraform Module using CodePipeline and Codebuild or Gitlab to push a Docker Image to Amazon ECR
-
copy
beta.tfvarsandbeta-init.tfvarstomyenv.tfvarsandmyenv-init.tfvarsin the same folder to include your config values. Make sure that thebucketvariable points to the S3 State file bucket you just created. -
When calling the Init command, your config cannot have any unused variables, which is why we separate a config for init and plan/apply
-
add the variable
bucketwith the newly created bucket tomyenv.tfvarsandmyenv-init.tfvars -
export ENV=myenv -
Make applyThis will deploy the application folder -
The ECR infrastructure lives here. You must push the docker image in order for the ECS Service to come up. The ECS Service can be created without the Docker Image being available.
-
Without a Pipeline, after the
applicationfolder is deployed, Push ECR Image -
Use CodePipeline, Gitlab or CLI to push the docker image.
-
If using Codepipeline, see
cicdfolder -
.gitlab-ci.ymlfile is included -
Deploy the
cicdfolder only if you need it. Release the Pipeline to build the image that the application stack will use- Under the
cicdfolder from the root terraform -chdir=application init -backend-config="conf/beta-init.tfvars --reconfigure"terraform -chdir=application apply -var-file conf/beta.tfvarspip install git-remote-codecommitgit remote add cc codecommit::us-east-1://terraform-ecs
- Under the