terraform-provider-cloudfoundry icon indicating copy to clipboard operation
terraform-provider-cloudfoundry copied to clipboard

cloudfoundry_app disk quota behaviour changed since v0.50.0

Open psycofdj opened this issue 2 years ago • 4 comments

With the v0.50.0 release, we're experiencing an undocumented change on the behavior of the resource cloudfoundry_app.

  • the provider wants to scale the disk quota of the application from 256MB to 1024MB
  • the disk_quota attribute is not specified in our resource
  • the default disk_quota value in the bosh manifests of the targeted cloudfoundry is 256MB

My guess is that the previous version of the provider (v0.15.5) did not send this field to the CF API when the attribute was unspecified, which led to using the cloudfoundry default value. Now the provider specifies a default value of 1024 for this field, and use it for his call to CF API.

This is not a big deal from my point of view. We can easily specify the disk_quota for our applications in terraform. We were just surprised that the plan wanted some modifications. Perhaps we could just add this precision in the v0.50.0 changelog ?

psycofdj avatar Nov 22 '22 17:11 psycofdj

Hi @psycofdj yes this should be noted. I'll make the change shortly, thanks!

loafoe avatar Nov 22 '22 17:11 loafoe

@psycofdj added a note to the release notes. We should keep this open to see if something can be done to solve this

loafoe avatar Nov 23 '22 18:11 loafoe

@loafoe This behavior is also present for memory. What's your opinion on keeping such default values? should we revert to the previous behavior of v0.15.5?

Thanhphan1147 avatar Nov 30 '22 09:11 Thanhphan1147

@Thanhphan1147 if it is possible to detect the previous behaviour -- not sending default value if user did not declare any value -- that would be preferred yes. In that case the deployment default will be used, which is the expected behaviour.

loafoe avatar Nov 30 '22 09:11 loafoe