Closed jmborsani closed 2 years ago
Thanks for opening an issue @jmborsani!
That's definitely a bug (displaying Import successful! vs actual 403
) that we will address in our next release.
Speaking about the reason why you got 403
, you need to set the following env variables first before importing the resource:
$ export CONFLUENT_CLOUD_API_KEY="<cloud_api_key>"
$ export CONFLUENT_CLOUD_API_SECRET="<cloud_api_secret>"
# and then run
$ terraform import "confluentcloud_kafka_cluster.basic" "<ENV_ID>/<CLUSTER_ID>"
Let me know if that helps.
That worked. Thank you! @linouk23
@jmborsani we're very excited to let you know we've just published a new version of TF Provider that includes a fix for this issue among other very exciting improvements: it enables fully automated provisioning of our key Kafka workflows (see the demo) with no more manual intervention and makes it our biggest and most impactful release.
The only gotcha we've renamed it from confluentinc/confluentcloud
to confluentinc/confluent
but we published a migration guide so it should be fairly straightforward. The existing confluentinc/confluentcloud
will be deprecated soon so we'd recommend switching as soon as possible.
New confluentinc/confluent
provider also includes a lot of sample configurations so you won't need to write them from scratch. You can find them here, find a full list of changes here.
Terraform version
Configuration
The API key was created following this documentation: https://registry.terraform.io/providers/confluentinc/confluentcloud/latest/docs/guides/sample-project#get-a-confluent-cloud-api-key
Command
The environment_id looks like
env-1234
and cluster_id looks likelkc-1234
.Output
Trace