Code Monkey home page Code Monkey logo

Comments (6)

linouk23 avatar linouk23 commented on May 29, 2024 1

👋 thanks for creating an issue!

Via confluent_api_key.secret it is possible to access the key's secret but how to access the key (name, e.g. "AB6CD2EFGHIJK1LM") itself? confluent_api_key.key as suggested in other tickets doesn't work. Please also add this to the documentation.

That's kinda similar to #30 (we'll add it to our docs in our next release!), you basically need to use .id attribute like this:

resource "confluent_kafka_topic" "orders" {
...
  credentials {
    key    = confluent_api_key.app-manager-kafka-api-key.id
    secret = confluent_api_key.app-manager-kafka-api-key.secret
  }
}

BTW: It would also be a good idea to mention in the documentation that the secret itself can be read out and stored e.g. in a key-vault if human access is required.

sure, could you expand on that a little bit?

from terraform-provider-confluent.

neuweiler avatar neuweiler commented on May 29, 2024 1

@neuweiler could you share more details about:

BTW: It would also be a good idea to mention in the documentation that the secret itself can be read out and stored e.g. in a key-vault if human access is required

Sure, usually it's best practice not to store the key and its secret anywhere and just use confluent_api_key to configure other resources in the cloud on-the-fly (via TF). But in our case, we also need to configure a server that can't be managed via TF and the key/secret need to be configured by hand by an admin. In order to give the admin access to this information, we use this fragment to store it in a Azure KeyVault where only admin get access to (via Azure Portal) :

resource "azurerm_key_vault_secret" "connect-xyz-consumer-key" {
key_vault_id = data.azurerm_key_vault.vault.id
name = "connect-xyz-consumer-key"
value = confluent_api_key.xyz-consumer-key.id
}

resource "azurerm_key_vault_secret" "connect-xyz-consumer-secret" {
key_vault_id = data.azurerm_key_vault.vault.id
name = "connect-xyz-consumer-secret"
value = confluent_api_key.xyz-consumer-key.secret
}

from terraform-provider-confluent.

linouk23 avatar linouk23 commented on May 29, 2024

Added id to the list of exported attributes of confluent_api_key resource:
image
in the latest 0.8.1 release.

@neuweiler could you share more details about:

BTW: It would also be a good idea to mention in the documentation that the secret itself can be read out and stored e.g. in a key-vault if human access is required

from terraform-provider-confluent.

Marcus-James-Adams avatar Marcus-James-Adams commented on May 29, 2024

@linouk23 something I have noticed - on a lot of your docs is that you are putting (required String) or (optional) on attributes referenced. from the terraform docs naming convention you don't put that on the description of any listed in the reference section as they are all references

from terraform-provider-confluent.

linouk23 avatar linouk23 commented on May 29, 2024

@Marcus-James-Adams that sounds interesting, could you expand on that? I didn't quite understand it:

from the terraform docs naming convention you don't put that on the description of any listed in the reference section as they are all references

Update: I see now, I wonder whether this additional data is still helpful or you'd rather see just their types though (without required / optional).

from terraform-provider-confluent.

linouk23 avatar linouk23 commented on May 29, 2024

@neuweiler we're happy to let you know we've just released 0.9.0 version of TF Provider that fixes this issue in our docs.

from terraform-provider-confluent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.