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

Error when importing entities #297

Open
andersjanssonmontel opened this issue Oct 29, 2024 · 0 comments
Open

Error when importing entities #297

andersjanssonmontel opened this issue Oct 29, 2024 · 0 comments

Comments

@andersjanssonmontel
Copy link

Attempting to import a fusionauth_entity resource causes the following error:

Error: unexpected status code: 400(Bad Request) Errors: A tenant Id is required to complete this request. To complete this request, you may assign a tenant to your API key, or add the X-FusionAuth-TenantId HTTP request header with the tenant Id.

Since the entity configuration specifies a tenant_id, I would assume we should be able to do this without using a tenant scoped api key, since that is how any other resource import works.

Example of a resource import causing this error:

import {
  to = fusionauth_entity.news_api
  id = "65108a61-a287-4b3a-bf32-4d40dff1a418"
}

resource "fusionauth_entity" "news_api" {
  tenant_id      = fusionauth_tenant.montel.id
  client_id      = data.azurerm_key_vault_secret.entity_news_api_client_id.value
  client_secret  = data.azurerm_key_vault_secret.entity_news_api_client_secret.value
  entity_type_id = fusionauth_entity_type.news_api.id
  name           = "News-API"
}

This may be related to this issue regarding modifying or deleting an entity (#118)

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