Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import of Scram Credential Resource #349

Open
seed-doordash opened this issue Sep 13, 2023 · 0 comments
Open

Import of Scram Credential Resource #349

seed-doordash opened this issue Sep 13, 2023 · 0 comments

Comments

@seed-doordash
Copy link

seed-doordash commented Sep 13, 2023

This is related to pulumi/pulumi-kafka#208

We are in the process of importing TF created kafka resources to Pulumi and facing a roadblock importing kafka_user_scram_credential. The underneath implementation of pulumi-kafka 100% relies on this provider (using tf-bridge)

In our TF state

    {
      "module": "module.self_server_import_test_user_1",
      "mode": "managed",
      "type": "kafka_user_scram_credential",
      "name": "kafka_user",
      "provider": "provider[\"registry.terraform.io/mongey/kafka\"]",
      "instances": [
        {
          "schema_version": 0,
          "attributes": {
            "id": "self_server_import_test_user_1|SCRAM-SHA-256",
            "password": ":REDACTED",
            "scram_iterations": 4096,
            "scram_mechanism": "SCRAM-SHA-256",
            "username": "self_server_import_test_user_1"
          },
          "sensitive_attributes": [
            [
              {
                "type": "get_attr",
                "value": "password"
              }
            ]
          ],
          "private": "bnVsbA==",
          "dependencies": [
            "data.aws_secretsmanager_secret_version.password",
            "data.aws_secretsmanager_secret_version.username",
            "module.self_server_import_test_user_1.aws_secretsmanager_secret.kafka_user_password",
            "module.self_server_import_test_user_1.aws_secretsmanager_secret_version.kafka_user_password",
            "module.self_server_import_test_user_1.random_password.password"
          ]
        }
      ]
    },

However, we keep getting

Diagnostics:
  kafka:index:UserScramCredential (self_server_import_test_user_1):
    error: Preview failed: resource 'self_server_import_test_user_1|SCRAM-SHA-256' does not exist

  pulumi:pulumi:Stack (kafka-user-user-test-import):
    error: preview failed

I notice in the doc, we do not even mention importing Kafka User resource.

  1. can this resource be imported? (even into TF, assuming a SCRAM user is created outside of TF)
  2. any insight how can we unblock ourselves?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant