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

Documentation is incorrect for importing confluent_tag #512

Open
Noel-Jones opened this issue Dec 12, 2024 · 3 comments
Open

Documentation is incorrect for importing confluent_tag #512

Noel-Jones opened this issue Dec 12, 2024 · 3 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@Noel-Jones
Copy link

Documentation says to set three imports

$ export IMPORT_SCHEMA_REGISTRY_API_KEY="<schema_registry_api_key>"
$ export IMPORT_SCHEMA_REGISTRY_API_SECRET="<schema_registry_api_secret>"
$ export IMPORT_SCHEMA_REGISTRY_REST_ENDPOINT="<schema_registry_rest_endpoint>"
$ terraform import confluent_tag.pii lsrc-8wrx70/PII

however in reality it is necessary to set FOUR exports, none with the IMPORT_ prefix.

$ export SCHEMA_REGISTRY_API_KEY="<schema_registry_api_key>"
$ export SCHEMA_REGISTRY_API_SECRET="<schema_registry_api_secret>"
$ export SCHEMA_REGISTRY_REST_ENDPOINT="<schema_registry_rest_endpoint>"
$ export SCHEMA_REGISTRY_ID="<schema_registry_id>"
$ terraform import confluent_tag.pii lsrc-8wrx70/PII

It would also be useful to note that DataDiscovery or DataSteward role is required against the environment to read or create tags.

@Noel-Jones
Copy link
Author

Initial error message is

│ Error: error importing Tag "lsrc-j0pn2/TfManaged": error reading Tag: one of provider.schema_registry_rest_endpoint (defaults to SCHEMA_REGISTRY_REST_ENDPOINT environment variable) or resource.rest_endpoint must be set

Then after removing the IMPORT_ prefixes

│ Error: All 4 schema_registry_api_key, schema_registry_api_secret, schema_registry_rest_endpoint, schema_registry_id attributes should be set or not set in the provider block at the same time

These messages clued me in to what is required.

@sajjadlateef
Copy link

Thank you for the report.

@sajjadlateef sajjadlateef added the documentation Improvements or additions to documentation label Dec 17, 2024
@linouk23
Copy link
Contributor

@Noel-Jones thanks for reporting the issue!

FWIW

$ export IMPORT_SCHEMA_REGISTRY_API_KEY="<schema_registry_api_key>"
$ export IMPORT_SCHEMA_REGISTRY_API_SECRET="<schema_registry_api_secret>"
$ export IMPORT_SCHEMA_REGISTRY_REST_ENDPOINT="<schema_registry_rest_endpoint>"
$ terraform import confluent_tag.pii lsrc-8wrx70/PII

should work, but I think we've found a bug in the code that we need to resolve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants