#pr-reviews (2021-05)
Pull Request Reviews for Cloud Posse Projects
2021-05-04
what Ignoring desired count changes for aws_ecs_service why Desired count is a rough estimate that can be volatile during peak hours of the service that the containers serve Autoscaling policies…
I don’t want to ignore the desired count in my ecs service tho
what Ignoring desired count changes for aws_ecs_service why Desired count is a rough estimate that can be volatile during peak hours of the service that the containers serve Autoscaling policies…
and the lifecycle meta argument does not allow variable interpretation
the only way you could do it, is if you added a new aws_ecs_service that could be toggled but since youd also have to account for ignore the task definition or not ignoring the task definition, you have to add 2 new aws_ecs_service resources…….
it would be easier to create a toggle to disable the creation of the ecs service inside the tf module and simply create it outside of the module definition and then you can ignore changes on any resource argument you like
but… at that point, you might as well just use custom tf code… oof this is where terraform kind of stinks
if you set the var.desired_count = null
, does it ignore the input auto-magically ?
:thinking_face: I see. Yeah I understand that there are use-cases when you’d want to set the desired count every time.
So desired count defaults to 0 … And you specify the min & max through aws_appautoscaling_target
resource…
Let me see if I set that back to default/null what happens
I have a feeling this isn’t going to work though, as the docs specifically point out ignoring desired_count
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_service#ignoring-changes-to-desired-count
But worth testing it nonetheless!
Nope I set it to null
and its set desired_count
to 0! Not one for production then
Ok we’ve closed the PR. Will have to write some custom TF code then I guess
It’s a difficult issue to solve but worth discussing. The method of creating 2 new ecs service resources with the desired permutations of (3) ignoring desired count and (4) ignoring desired count and task def (where (1) is ignoring nothing and (2) is ignoring the task def) might be the only option here
Agreed. It doesn’t look like terraform will allow interpolations in the lifecycle block anytime soon (I can only assume this is a complex thing to do). Looks like the issue was first raised in 2015
I wouldn’t want to end up in a scenario where we have loads of ECS services declared though for every possible combination, that would be a maintenance nightmare. Seems like being able to specify lifecycle attributes at the module level would be best (https://github.com/hashicorp/terraform/issues/27360)
Current Terraform Version Terraform v0.14.3 Use-cases Terraform currently only allows the lifecycle meta-argument to be used within the declaration of a resource. It would be really useful if users…
I’ll go with creating the 4 different permutations for now and hope that this would be better solved in the future
2021-05-05
https://github.com/cloudposse/terraform-aws-ecs-alb-service-task/pull/116 We’ve created a draft based on the feedback from above ^^
This has added a third ecs service that right now only ignores the changes to desired_count
(So we don’t have one for both desired count + task definition because right now we don’t have the use-case for it, I’d rather that be added later if its needed) - want to know any thoughts on this before creating a PR and changing our code / moving remote state to avoid any unnecessary changes
what Add ignore_desired_count aws_ecs_service that has lifecycle setup to ignore desired_count changes why Desired count is a rough estimate that can be volatile during peak hours of the service…
This is ready for a re-review now
what Add ignore_desired_count aws_ecs_service that has lifecycle setup to ignore desired_count changes why Desired count is a rough estimate that can be volatile during peak hours of the service…
@RB is there any chance I could get this reviewed please?
i ran the tests but the tests failed. please take a look when time permits
@RB Please can you take another look, cheers
Any chance we can get a stamp of approval on this one?
The tests all passed on this one, can we get an approval please?
It hurts to approve that one but no one can think of an alternative other than using custom terraform. The module now has 4 ecs service resources with copied and pasted terraform resource inputs
Yeah until terraform make the lifecycle of a resource configurable at the module level I don’t think theres much we can do. Right now this change is breaking for us anyway (We need to terraform state mv from the old location to the new). If the underlying terraform resource for the ECS service ignored the value of desired count if its null
that would have avoided this whole issue but what can you do
2021-05-06
2021-05-07
2021-05-14
2021-05-19
2021-05-20
Hi
Please give a super quick review to This PR
what Remove quotes from variable types why Broken in terraform 0.15
2021-05-23
Hi there, here we go https://github.com/cloudposse/terraform-aws-rds/pull/115
what Setting ca_cert_identifier default value to null, leaving its resolution up to the AWS resournce why Creating RDS in newer regions such as eu-south-1, ap-east-1, me-south-1, af-south-1 errors …
2021-05-24
super quick one to review please https://github.com/cloudposse/terraform-aws-ec2-autoscale-group/pull/69
what To add autoscaling policy scale up and down arn to outputs
thank you @Matt Gowie!
what To add autoscaling policy scale up and down arn to outputs
2021-05-25
and another quick one please https://github.com/cloudposse/terraform-aws-cloudfront-s3-cdn/pull/169
what To add support for a custom cache policy for ordered cache
can we get this in? it’s green
what To add support for a custom cache policy for ordered cache
2021-05-26
https://github.com/cloudposse/terraform-aws-ecs-web-app/pull/148 Can someone take a look at this one?
what Pass along the exec_enabled variable into ecs-alb-service-task why To be able to use exec on ECS tasks references cloudposse/terraform-aws-ecs-alb-service-task#113