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

Terraform Import / Plan unable to detect existing API Key & Service accounts #85

Open
NareshAnaparthi opened this issue May 24, 2021 · 0 comments

Comments

@NareshAnaparthi
Copy link

NareshAnaparthi commented May 24, 2021

Tried terraform import for existing stress env. Was able to import entities like env, cluster. But subsequent Terraform Plan unable to detect existing resources API Key & Service account and populating under destroy list like show below.

confluentcloud_service_account.test: Refreshing state... [id=156958]
confluentcloud_environment.environment: Refreshing state... [id=env-kj5w2]
confluentcloud_kafka_cluster.test: Refreshing state... [id=lkc-j0xw8]
confluentcloud_api_key.provider_test: Refreshing state... [id=186917]

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
-/+ destroy and then create replacement

Terraform will perform the following actions:

# confluentcloud_api_key.provider_test must be replaced
-/+ resource "confluentcloud_api_key" "provider_test" {
+ cluster_id = "lkc-j0xw8" # forces replacement
+ environment_id = "env-kj5w2" # forces replacement
~ id = "186917" -> (known after apply)
+ key = (known after apply)
+ secret = (sensitive value)
}

# confluentcloud_service_account.test must be replaced
-/+ resource "confluentcloud_service_account" "test" {
+ description = "Service account for hcs-kafka" # forces replacement
~ id = "156958" -> (known after apply)
+ name = "hcs-kafka-sa" # forces replacement
}

Plan: 2 to add, 0 to change, 2 to destroy.
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