stackitcloud / terraform-provider-stackit

The official Terraform provider for STACKIT
https://registry.terraform.io/providers/stackitcloud/stackit
Apache License 2.0
34 stars 13 forks source link

`stackit_mongodbflex_user`: Host should return just the host #257

Open JorTurFer opened 6 months ago

JorTurFer commented 6 months ago

host field returns the connection data:

 + mongodb_host = "mongodb://fake:*******@s-xxxx-xxxx-xxx.mongodb.eu01.onstackit.cloud:27017/stackit?authSource=stackit&tls=true&authMechanism=SCRAM-SHA-256"

This isn't always enough as I can require to change some connection parameters and now I can't.

The only option to have the host right now is doing

"s-${stackit_mongodbflex_instance.instance.instance_id}.mongodb.eu01.onstackit.cloud"

This works as a workaround but in the mid/long term, having a field for recovering the server host only would be nice as it will rely on the terrform provider to generate the correct host instead of by myself. As user, probably I won't be aware about related changes and upgrading the provider could be always good.

JorTurFer commented 6 months ago

In the same way, the host with **** hiding the secret doesn't makes sense as I can't use it for anything without adding more logic on top of it

hcsa73 commented 6 months ago

Hello! Thanks for opening the issue We'll double-check what's the usecase for showing the connection parameters, and apply this if it's a better suit