Giter Site home page Giter Site logo

duduribeiro / terraform_ecs_fargate_example Goto Github PK

View Code? Open in Web Editor NEW
339.0 17.0 212.0 33 KB

Example used on my post about ECS Fargate

Home Page: https://medium.com/code-pub/easy-deploy-your-docker-applications-to-aws-using-ecs-and-fargate-a988a1cc842f

License: Other

HCL 100.00%
hacktoberfest

terraform_ecs_fargate_example's Introduction

terraform_ecs_fargate_example

terraform_ecs_fargate_example's People

Contributors

duduribeiro avatar jumbojett avatar martincerny-awin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

terraform_ecs_fargate_example's Issues

executable permissions

Observed the following issue in testing:

"Creating a CodePipeline that builds a docker image from GitHub source, but the executable bits for the executables inside the repo are lost."
https://forums.aws.amazon.com/thread.jspa?threadID=235452

bin/rails will not run without executable permissions, and so it fails.

SOLUTION:
In the buildspec.yml file, right before "docker build", add this.

- chmod -R a+x bin/

CodePipeline - Source step failing

Hi,

I have cloned the repository and was successfully able to run the code, however when I go into the AWS CodePipeline console, I see that the stage one that is Source: is failing below is the error message..

Invalid action configuration
The GitHub repository "duduribeiro/openjobs_experiment" or branch "master" does not exist.

I want to know if I have to create a new repository in my account and push the code there and run it again, what all changes would be required.

s3 bucket source error

I have been working through the Medium article:
https://thecode.pub/easy-deploy-your-docker-applications-to-aws-using-ecs-and-fargate-a988a1cc842f

I have been working on getting familiar with Terraform and we have a need to work with ECS. I have worked through a couple errors

  • needed to add the depends_on found in issue 1
  • had to comment out snapshot_identifier to resolve a different error.

I am not understanding where this error is coming from:

Error: Error applying plan:

1 error(s) occurred:

  • module.code_pipeline.aws_s3_bucket.source: 1 error(s) occurred:

  • aws_s3_bucket.source: Error creating S3 bucket: AuthorizationHeaderMalformed: The authorization header is malformed; the region 'us-east-1' is wrong; expecting 'eu-west-1'
    status code: 400, request id: 826AC1CDD1E4AE7F, host id: S0sAJO/REWWoTsQbSo1haIg6xlIUjLIr3oPCcWxssu8Em/0Lzdu2gK5bjHer9oBSAshGGYmTjaE=

I have searched the terraform_ecs_fargate_example repo for 'eu-west-1' and I have also cloned and searched opensanca_jobs (forked to my repo) and I am not seeing any reference to eu-west-1.

I have no idea where to go to fix this. Any thoughts or ideas?

module.ecs.data.aws_ecs_task_definition.web: 1 error(s) occurred

Hello,

It errored on an apply, and now plan/apply gives this:

aws_route53_record.www-prod: Refreshing state... (ID: Z2BMRACSMJPALR_www.mysite.com_A)

Error: Error refreshing state: 1 error(s) occurred:

  • module.ecs.data.aws_ecs_task_definition.web: 1 error(s) occurred:

  • module.ecs.data.aws_ecs_task_definition.web: data.aws_ecs_task_definition.web: Failed getting task definition ClientException: Unable to describe task definition.
    status code: 400, request id: f61eb680-293a-11e8-ab3b-0fb5ad391a32 "tutorial_web"

Thanks!

Each argument may be set only once.

Error: Attribute redefined

on modules/ecs/main.tf line 258, in resource "aws_ecs_service" "web":
258: depends_on = ["aws_alb_target_group.alb_target_group"]

The argument "depends_on" was already set at modules/ecs/main.tf:245,3-13.

Logs on db migrate

First all thank you for helping the community!

I would like to know how I can see logs for db migrate tasks since they don't appear anywhere I can't understand if they are ok or not..

Thanks

'dns_name' error on destroy

I get the following error after running terraform destroy (after successful terraform apply)

Error: Error applying plan:

1 error(s) occurred:

  • module.ecs.output.alb_dns_name: Resource 'aws_alb.alb_project' does not have attribute 'dns_name' for variable 'aws_alb.alb_project.dns_name'

multi environment structure

Thanks for your sharing! I would like to know how are you going to set up structure of multi environment. Is it going to be like following structure?

├── modules
│ └── code_pipeline
│ └── ecs
│ └── networking
│ └── rds
├── pipeline.tf
├── production.tf
├── production_key.pub
├── dev.tf
├── dev_key.pub
├── test.tf
├── test_key.pub
├── terraform.tfvars
└── variables.tf

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.