#airship (2020-06)

airship

Home of Airship ECS Modules ( https://github.com/blinkist/terraform-aws-airship-ecs-service / https://github.com/blinkist/terraform-aws-airship-ecs-cluster )

Archive: https://archive.sweetops.com/airship/

2020-06-02

IvanM avatar

hey everyone Is there pls any update on porting https://github.com/blinkist/terraform-aws-airship-ecs-service to terraform 0.12?

blinkist/terraform-aws-airship-ecs-service

Terraform module which creates an ECS Service, IAM roles, Scaling, ALB listener rules.. Fargate & AWSVPC compatible - blinkist/terraform-aws-airship-ecs-service

IvanM avatar

or we should just stop praying for that?

2020-06-10

joshmyers avatar
joshmyers

heh, I was coming to ask the same question

joshmyers avatar
joshmyers
mhvelplund/terraform-aws-airship-ecs-service

Terraform module which creates an ECS Service, IAM roles, Scaling, ALB listener rules.. Fargate & AWSVPC compatible - mhvelplund/terraform-aws-airship-ecs-service

joshmyers avatar
joshmyers
Genomenon/terraform-aws-airship-ecs-service

Terraform module which creates an ECS Service, IAM roles, Scaling, ALB listener rules.. Fargate & AWSVPC compatible - Genomenon/terraform-aws-airship-ecs-service

joshmyers avatar
joshmyers

Would you mind me asking what functionality you have working?

maarten avatar
maarten

I’d like to understand if it’s more important to have the current module fitted into 0.12 or have a cleaner design based on 0.13.

joshmyers avatar
joshmyers

By the latter I assume you mean for_each and depends_on for modules etc?

maarten avatar
maarten

yes

joshmyers avatar
joshmyers

Would that change the design heavily?

maarten avatar
maarten

Not a great lot

joshmyers avatar
joshmyers

Doesn’t look like much would change there…

joshmyers avatar
joshmyers

I’d have thought a push to 0.12 would be good, and maybe small changes for 0.13

maarten avatar
maarten

@joshmyers the big change is that we won’t need a var.create, so the outputs are in some cases much easier to manage

joshmyers avatar
joshmyers

True

joshmyers avatar
joshmyers

Not touching alpha for a while though

Clayton Wheeler avatar
Clayton Wheeler

oh hey, hmm, I got pulled away from that so I don’t have it quite in release-worthy shape yet like I’d hoped to, but a decent amount. The basics, definitely. I’ve only done a little bit of load balancing, and haven’t touched autoscaling, cron tasks, placement, or volumes at all. But running normal containers esp. with Fargate, using Secrets Manager and IAM, service discovery, repository credentials, that works.

1
joshmyers avatar
joshmyers

Thanks

Clayton Wheeler avatar
Clayton Wheeler

just pushed a few changes I had sitting around. I’ve been using it in its current state and it’s been working well for me.

1
maarten avatar
maarten

That’s fine, I can take a look at the autoscaling and cron-tasks

joshmyers avatar
joshmyers

Grand - thanks very much folks

joshmyers avatar
joshmyers

I’m gonna be picking this up again for a project

joshmyers avatar
joshmyers

Where do PRs go back into now?

maarten avatar
maarten

I’ll copy master into a new 011 branch when i’m at home

maarten avatar
maarten

from that moment it will be master to PR against

joshmyers avatar
joshmyers

Awesome!

maarten avatar
maarten

and let’s not be to rigid with master now as I won’t be releasing anyway then

2
Clayton Wheeler avatar
Clayton Wheeler

Shall I open a PR with what I’ve got?

joshmyers avatar
joshmyers
blinkist/terraform-aws-airship-ecs-service

Terraform module which creates an ECS Service, IAM roles, Scaling, ALB listener rules.. Fargate & AWSVPC compatible - blinkist/terraform-aws-airship-ecs-service

joshmyers avatar
joshmyers

Wondering what folks are doing to deploy ECS tasks via CI/CD that services etc are managed with Terraform

Clayton Wheeler avatar
Clayton Wheeler

OK, I made PR #91. Thanks for the nudge on this!

1

2020-06-11

joshmyers avatar
joshmyers
Genomenon/terraform-aws-airship-ecs-service

Terraform module which creates an ECS Service, IAM roles, Scaling, ALB listener rules.. Fargate & AWSVPC compatible - Genomenon/terraform-aws-airship-ecs-service

joshmyers avatar
joshmyers
TestExamplesComplete 2020-06-11T16:45:27+01:00 command.go:158: Error: Error in function call
TestExamplesComplete 2020-06-11T16:45:27+01:00 command.go:158:
TestExamplesComplete 2020-06-11T16:45:27+01:00 command.go:158:   on ../../modules/live_task_lookup/output.tf line 19, in locals:
TestExamplesComplete 2020-06-11T16:45:27+01:00 command.go:158:   19:   environment_coalesce = "${coalescelist(data.aws_ecs_container_definition.lookup.*.environment, list(map()))}"
TestExamplesComplete 2020-06-11T16:45:27+01:00 command.go:158:
TestExamplesComplete 2020-06-11T16:45:27+01:00 command.go:158: Call to function "map" failed: map requires an even number of two or more
TestExamplesComplete 2020-06-11T16:45:27+01:00 command.go:158: arguments, got 0.
Genomenon/terraform-aws-airship-ecs-service

Terraform module which creates an ECS Service, IAM roles, Scaling, ALB listener rules.. Fargate & AWSVPC compatible - Genomenon/terraform-aws-airship-ecs-service

joshmyers avatar
joshmyers

@Clayton Wheeler are you using the live lookups?

joshmyers avatar
joshmyers
Genomenon/terraform-aws-airship-ecs-service

Terraform module which creates an ECS Service, IAM roles, Scaling, ALB listener rules.. Fargate & AWSVPC compatible - Genomenon/terraform-aws-airship-ecs-service

2020-06-12

joshmyers avatar
joshmyers
data "aws_ecs_task_definition" "default" {
  task_definition = "${var.namespace}-${var.name}-${var.environment}-${var.pool}"

  depends_on = [aws_ecs_task_definition.default]
}
maarten avatar
maarten

For this reason there is the lambda live lookup

maarten avatar
maarten

Which I’ve extracted in a separate lambda now so only one lambda is needed per region

joshmyers avatar
joshmyers

Adding an explicit depends_on gets over the bootstrap issue so I’m not sure the live lookup stuff is necessary?

joshmyers avatar
joshmyers

Bah, trying try(data.aws_ecs_container_definition.default.image, local.bootstrap_service_container_image) causes a cyclical dependency

    keyboard_arrow_up