Description
Hello,
I faced issues with optional parameters not being detected, I tried below to summarize the different problematics:
- Issue1: adding optional parameters is NOT detected:
Problem reproduction:
Config:
resource "cloudfoundry_app" "foo" {
name = "foo"
path = "foo.zip"
}
actions:
"TF apply" result: App is deployed with default amount of memory (1024Mb)
Then we edit the config to add the 'memory' parameter:
resource "cloudfoundry_app" "foo" {
name = "foo"
path = "foo.zip"
memory = 256
}
"TF apply" result: TF will report NO change and request to change memory amount is ignored
- Issue 2: removing an optional parameter is NOT detected neither:
Problem reproduction:
Scenario 1:
Config:
resource "cloudfoundry_app" "foo" {
name = "foo"
path = "foo.zip"
memory = 256
}
actions:
"TF apply" result: App is deployed with 256Mb
Then we edit the config to remove the 'memory' parameter:
resource "cloudfoundry_app" "foo" {
name = "foo"
path = "foo.zip"
}
"TF apply" result: TF will report no change, app will stay with 256Mb
Scenario 2:
Config:
resource "cloudfoundry_app" "foo" {
name = "foo"
path = "foo.zip"
}
actions:
"TF apply" result: App is deployed with default CF memory amount, which is 1024Mb
Conclusion of issue 2: With the same configuration, we get 2 different results.
Expected result:
In Issue1: added memory value should be applied
In Issue 2/scenario 1, "memory" parameter removal should be detected, and app should be restaged/restarted so that default amount of memory is applied