kashishK

terraform

Hi, I’m trying to use the Terraform provider with an existing ZITADEL org/project/OIDC app and all imports fail, even though terraform plan can create new resources.

Setup

Terraform: v1.14.0
Provider: zitadel/zitadel v2.3.0

Provider config:
provider "zitadel" {
domain = "domain.us1.zitadel.cloud"
jwt_profile_file = "service-account.json"
}

Service User Configuration:
Access token type: JWT
Permissions: Has Org Owner on org and Project Owner Global on project.

What works

  1. Terraform plan against this config shows it would create a new org/project/app, so auth + domain look fine.
  2. Calling https://domain.us1.zitadel.cloud/.well-known/openid-configuration returns 200.
What fails

  1. Import org:
terraform import zitadel_org.imported '12345678912345678'
Error:error while getting org by id 12345678912345678: ErrorType=server_error Description=Errors.Internal

  1. Import project (after commenting out org resource so it’s not managed):
terraform import zitadel_project.imported '12345678912345678'
Error: failed to get project

  1. Import OIDC app:
terraform import zitadel_application_oidc.imported '12345678912345678:12345678912345678:12345678912345678'
Error:failed to get application oidc


Even if I switch to a different service User(with no roles), I still get the same Errors.Internal / failed to get ... messages, which makes me think this is not just a permission issue.

Questions

Is there any known issue with imports for existing org/project/app on hosted ZITADEL?
Are these IDs/commands in the correct format for v2.3.0 of the Terraform provider?
Was this page helpful?