confluentinc / terraform-provider-confluent

Terraform Provider for Confluent
Apache License 2.0
27 stars 63 forks source link

Request: allow export of API keys with confluent_tf_importer #344

Closed rgraber closed 9 months ago

rgraber commented 9 months ago

We are trying to move a few medium-sized clusters into terraform. We originally created them in the Confluent Console UI, including several API keys for different services. Importing all these keys manually into terraform is a pain. It would be helpful if these could be imported as part of the confluent_tf_importer resources.

linouk23 commented 9 months ago

@rgraber thanks for creating this issue!

We thought a bit about it before and we could see 2 scenarios:

  1. Somehow Importer tool is able to infer API Keys' secrets automatically. Unfortunately, I don't think it's possible as API Key Mgmt API follows the best security practices and doesn't include secret in GET request.

  2. Alternatively, a user could pass a list of API Keys' secrets in env vars / importer resources, but at this point it's very similar to importing them one by one.

Let me know whether it makes sense or there's a way we could improve the UX here!