risingwavelabs / terraform-provider-risingwavecloud

Apache License 2.0
0 stars 0 forks source link

feat: support managing cluster users #23

Closed mikechesterwang closed 4 months ago

mikechesterwang commented 4 months ago

Note that the control plane does not support getting password.

The password will be stored in the state in Create and Update operations to avoid inconsistency between plan and state. But the Read operation will try to read password from the state since we do not know the password at the cloud side.

mikechesterwang commented 4 months ago

The acceptance test is passed.

wjf3121 commented 4 months ago

So the update password API will be called and the plan show there is a diff in the password field everytime terraform plan is called.

It seems that the common practice is to store the password in the TF state file and compare it with the value in the config. (Both RDS and cloud SQL do that).

mikechesterwang commented 4 months ago

So the update password API will be called and the plan show there is a diff in the password field everytime terraform plan is called.

It seems that the common practice is to store the password in the TF state file and compare it with the value in the config. (Both RDS and cloud SQL do that).

Okay, I just made it to read the password from the state. But, in this case, if user change the password somewhere else, Terraform won't be aware of that. But I guess it is fine since it is the common practice.