redpanda-data / terraform-provider-redpanda

Apache License 2.0
6 stars 3 forks source link

fix: pass mTLS certificates correctly (TypeListToStringSlice shouldn't quote special characters) #172

Closed ligfx closed 3 weeks ago

ligfx commented 1 month ago

When calling it on actual strings, the string gets quoted and special characters like newlines are escaped. It was trimming the quotes but not fixing escaped characters. This was messing up passing mTLS PEM-format certificates, which contain newlines.

Change the logic if called on a types.List that has actual types.String values so we keep the exact string value. Ideally this function is somehow typed so it can only ever be called on types.List that have strings but that seems like a bigger project.