-
Notifications
You must be signed in to change notification settings - Fork 33
docker-compose/rancher-compose marked as dirty #35
Comments
This is because you have to quote the numbers and booleans in your yaml file. |
It's a bit more than that it turns out. You have to quote the numbers and booleans except in the top-level volumes block. |
Well in a way that makes sense. I don't know what to do with this issue. Is it really one? Should we transparently cast booleans and integers to strings in the source yaml bedore passing it to libcompose to compare with what exists on Rancher? @raphink an opinion? |
Same happens with Another bit of weirdness is that if you create a stack with an external volume called A, then remove it at a later time, the volume stays in the rancher docker-compose.yml forever. That seems like a rancher bug though (could be wrong). It's really confusing seeing that it always has changes that need applying even when it doesn't. It also makes using scripts hard as you have to know about this weirdness. |
So, to summarise what I've found so far:
|
One more thing I just found; When you have a port mapping, |
We are already using libcompose to normalize the files before comparing them, so I don't see what else can be reasonably done to avoid these differences… |
libcompose only deals with plain compose files. I think this provider would have to mutate the input compose file the same way that rancher does it. |
We should try and find the lib that Rancher uses for that. @cloudnautique any idea? |
Terraform Version
Using
terraform-provider-rancher_v0.2.0_x4
Affected Resource(s)
rancher_stack
Repro
My docker-compose file:
Terraform thinks the server docker-compose is:
Expected Behaviour
After applying the resource, I would expect it not to be marked as dirty
Actual Behaviour
Resource is marked as dirty so Terraform wants to push a modification
Steps to Reproduce
terraform apply
terraform plan
The text was updated successfully, but these errors were encountered: