orange-cloudfoundry / terraform-provider-cloudfoundry

A terraform provider to manage a Cloud Foundry instance.
Apache License 2.0
31 stars 8 forks source link

Broker resource incorrectly reports change in password #29

Open gberche-orange opened 7 years ago

gberche-orange commented 7 years ago

We're observing that when upgrading terraform-provider-cloudfoundry from 0.7.3 to 0.9.1, the plan output is reporting unexpected changes to all our broker passwords:

  ~ cloudfoundry_service_broker.tf-p-mysql
      password:            <sensitive> => <sensitive> (attribute changed)

Using https://github.com/wybczu/tfjson to render the plan file and display otherwise redacted values, I see that the planned new value isn't different from the current one.

I'm wondering whether this could be related to previous fix 7a02e0b88497e2f90a29e63e4c2cefa35a38c484 https://github.com/orange-cloudfoundry/terraform-provider-cloudfoundry/blob/7a02e0b88497e2f90a29e63e4c2cefa35a38c484/resources/service_broker.go#L544

and whether inspiration from similar pattern in core aws provider could help address the issue: https://github.com/terraform-providers/terraform-provider-aws/blob/0bfaf6cd4d85a2fb2b32d71ab26341e8d95b0661/aws/resource_aws_db_instance.go#L945-L949