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

password changes in scram credentials not detected

Open piif opened this issue 1 year ago • 1 comments

When using scram credentials, kafka_user_scram_credential entries don't test if specified password is correct. Thus if password is modified by an external way, terraform won't show entry to be "changed"

Is there a way to check if current password is still valid during "plan" phase ?

piif avatar Dec 01 '23 13:12 piif

After some tests, it seems calling sarama.NewClient with specified credentials is enough to check if they are valid. Thus, during comparison between state and target brokers, it should be possible to try connection and set a flag to indicate credential validity

piif avatar Dec 01 '23 16:12 piif