layer0 icon indicating copy to clipboard operation
layer0 copied to clipboard

Terraform: improve diff checking for deploys

Open zpatrick opened this issue 8 years ago • 0 comments

The deploy.Dockerrun field returned by the Layer0 API's GetDeploy() function usually does not hold the exact same information as the Dockerrun.aws.json that created it. This is because ECS will fill in missing fields automatically before creating the Task Definition.

As a result, if you populate the content field of the layer0_deploy resource, Terraform will always detect differences between the current and desired content.

Terraform has a way of fixing this issue, the SchemaDiffSupressFunc. My first attempt at using this function wasn't good enough (here) as it fails to ignore the "non-critical' differences between Dockerruns. We should include this ignoring behavior in the diffSupressFunc to fix this problem.

zpatrick avatar Jul 26 '17 20:07 zpatrick