https://pulumi.com logo
Title
f

fast-easter-23401

08/17/2022, 12:24 PM
Hello folks, I’m struggling with the confluent cloud API, that we’re using to create a Kafka related resources (topics, SA, api keys, and what not). We have properly configured the GCP Marketplace integration, and I’m acting on the confluent platform as a member of my organization, but can’t manage to create a kafka topic. Any ideas what’s failing?
const topic = new KafkaTopic(
  args.name,
  {
    topicName: args.name,
    kafkaCluster: { id: cluster.id },
    restEndpoint: cluster.restEndpoint,
    credentials: {
      key: clusterSA.apiKey.name,
      secret: clusterSA.apiKey.secret,
     },
   },
 { parent: this }
);

   Type                                    Name                    Status                  Info
     pulumi:pulumi:Stack                     confluent-test          **failed**              1 error; 2 messages
     └─ nesto:kafka                          test                                            
 +      ├─ confluentcloud:index:KafkaTopic   test                    **creating failed**     1 error
 +      └─ confluentcloud:index:RoleBinding  test-environment-admin  **creating failed**     1 error
 
Diagnostics:
  pulumi:pulumi:Stack (confluent-test):
    2022/08/17 08:19:24 [DEBUG] POST <https://pkc-41voz>.<region>.gcp.confluent.cloud:443/kafka/v3/clusters/<cluster-id>/topics
 
    error: update failed
 
  confluentcloud:index:KafkaTopic (test):
    error: 1 error occurred:
        * error creating Kafka Topic: 401 Unauthorized: Unauthorized
I also tried it creating a Provider resource, then passing the latter as
opts
. Didn’t work either. Any insights will be greatly appreciated. Have a nice day,
e

echoing-dinner-19531

08/17/2022, 12:40 PM
f

fast-easter-23401

08/17/2022, 1:00 PM
Hi @echoing-dinner-19531, Yes, they’ve been set as stack configs.
e

echoing-dinner-19531

08/17/2022, 1:02 PM
might be worth raising an issue at https://github.com/pulumi/pulumi-confluent, I'm not sure how confluent auth works exactly might be a kafka specific thing, or the provider not validating auth on startup
f

fast-easter-23401

08/18/2022, 7:55 PM
will do. We know there’s a confluent endpoint for creating topic using their REST API. We’ll try to circumvent this difficulty by creating a dynamic provider.
Thanks @echoing-dinner-19531
f

full-artist-27215

10/04/2022, 5:46 PM
@fast-easter-23401 Did you ever sort out a solution to this? We've got a dynamic provider we made before the new Confluent Cloud provider was released and I'm trying to migrate us over and am having problems importing topics.
Never mind on that... false alarm 🤦‍♂️
f

fast-easter-23401

10/04/2022, 6:57 PM
ok, good to hear that.