Comments (7)
@mallie-su @sc-alistairdeneys my team discussed this issue internally and I'm happy to let you know that we'll add this functionality in our upcoming 0.8.0
release.
from terraform-provider-confluent.
The hacky way works like a charm! Not quiet user friendly, espcially with a remote state, but eh, it works!
But I do think that the feature to import the keys would be much easier 😉
Thanks a lot @linouk23!
from terraform-provider-confluent.
@mallie-su @sc-alistairdeneys @Talgatele we're happy to let you know that we've implemented import for confluent_api_key
resource in our latest 0.8.0
release.
from terraform-provider-confluent.
Fantastic! Thanks for the notification @linouk23
from terraform-provider-confluent.
@mallie-su thanks for opening an issue! That's very exciting you've proactively migrated to 0.7.0
and it went smoothly for you!
We're thinking about adding an import functionality for confluent_api_key
but it's not supported at the moment.
One hacky thing you could do right now is to fake an import (I'll use Kafka API Key as an example) by:
- Adding its config to your TF configuration file (
main.tf
):
# Adjust the variables
resource "confluent_api_key" "app-producer-kafka-api-key" {
display_name = "app-producer-kafka-api-key"
description = "Kafka API Key that is owned by 'app-producer' service account"
owner {
id = confluent_service_account.app-producer.id
api_version = confluent_service_account.app-producer.api_version
kind = confluent_service_account.app-producer.kind
}
managed_resource {
id = confluent_kafka_cluster.basic.id
api_version = confluent_kafka_cluster.basic.api_version
kind = confluent_kafka_cluster.basic.kind
environment {
id = confluent_environment.staging.id
}
}
}
- Adding it to TF state file (
terraform.tfstate
):
{
"mode": "managed",
"type": "confluent_api_key",
"name": "app-producer-kafka-api-key",
"provider": "provider[\"registry.terraform.io/confluentinc/confluent\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"description": "Kafka API Key that is owned by 'app-producer' service account",
"display_name": "app-producer-kafka-api-key",
"id": "WI34H6UO111111111",
"managed_resource": [
{
"api_version": "cmk/v2",
"environment": [
{
"id": "env-abc-123"
}
],
"id": "lkc-xyz123",
"kind": "Cluster"
}
],
"owner": [
{
"api_version": "iam/v2",
"id": "sa-abc123",
"kind": "ServiceAccount"
}
],
"secret": "***REDACTED***"
},
"sensitive_attributes": [],
"private": "bnVsbA==",
"dependencies": [
"confluent_environment.staging",
"confluent_kafka_cluster.basic",
"confluent_service_account.app-producer"
]
}
]
},
(update all IDs including secret
attribute)
and then run terraform plan
that should show no changes to the config 🤞
Let me know if it helps!
from terraform-provider-confluent.
That's great to hear!
But I do think that the feature to import the keys would be much easier 😉
For sure, I'll keep this issue open until we add it.
from terraform-provider-confluent.
I'd like to +1 this feature request.
I'm in the process of migrating our Confluent configuration to Terraform and it would be great if we could manage all resources, including API keys, in Terraform.
from terraform-provider-confluent.
Related Issues (20)
- Add support for new topic configuration fields - message.timestamp.after.max.ms and message.timestamp.before.max.ms HOT 6
- Schema not found when importing a schema in a 20000+ schemas in Schema Registry HOT 3
- Request: allow export of API keys with confluent_tf_importer HOT 1
- Support importing network,schema registry,tgw attachment resources using Resource Importer
- confluent_tag_binding resource should support entity_name updates for sr_record and sr_field HOT 1
- custom connector deployment and generic API error
- Alias argument for confluent_subject_config resource HOT 7
- confluent_kafka_topic attributes aren't exported, but doc says they are HOT 2
- Support showing that schema_identifier is going to be updated for confluent_schema resource during plan HOT 2
- `rest_endpoint` is not (correctly) imported when importing a migrated `confluent_mirror_topic` into a `confluent_topic` HOT 11
- GCS connector resource HOT 2
- Confluent Cloud API key creation using terraform - How to get API secret on Visual code CLI to pass that information to end user? HOT 2
- Error: error creating Role Binding: 403 Forbidden: Forbidden Access - Getting this error while creating rolebinding HOT 7
- managing local confluent cluster HOT 1
- Schema validation fails when deleting schema HOT 2
- 401 While Creating a Connector HOT 2
- Error creating Business Metadata Binding: Business-metadata attribute already exists in entity
- Request for Documentation around Single-Message Transforms HOT 2
- Error: error fetching Kafka Cluster "lkc-xxxxxx"'s "rest_endpoint" attribute: error reading Kafka Cluster "lkc-xxxxx": 404 Not Found: Resource Not Found HOT 4
- Support all schema registry global config options
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-provider-confluent.