TaskDefinition Always Replace When Default Values Not Included in ContainerDefinitions
See original GitHub issueI have an ECS service that is having it’s task definition replaced every time I run pulumi up
even if no changes are made to the task definition. The diff that pulumi is reporting shows the only change being the container definitions string. It appears that the container definitions string in the stack’s state has default values for several fields filled in (e.g. cpu=0, mountPoints=[], volumesFrom=[], etc.) while my code does not. The comparison isn’t adding those default values before comparing the two strings so it reports they are different. I’ve manually added all the default values and now pulumi up
correctly reports there are no changes. Is it possible to have those default values considered when doing the comparison so I don’t have to make sure they are always present in my code? I’m using version 1.14.1 with the golang SDK.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (2 by maintainers)
@mattsleiman-discovery for Fargate task definition I was able to fix this by providing default health check values, for the rest like CPU and memory I didn’t mention it as for Fargate its not mandatory and it does not replace container definition anyway, the only values for me that kept replacing containerdefinitions was heathCheck values:
This is effectively due to https://github.com/hashicorp/terraform-provider-aws/issues/11526 in upstream. The normalization used in the diff implementation could in principle handle all of the topics raised here:
user
missing or set to default value