Azure / terraform-provider-azapi

Terraform provider for Azure Resource Manager Rest API
https://registry.terraform.io/providers/Azure/azapi/latest
Mozilla Public License 2.0
184 stars 48 forks source link

error: `identity` is not expected here. Do you mean `id`? #438

Open smedegaard opened 7 months ago

smedegaard commented 7 months ago

I'm trying to create a azapi_resource passing in the id of a azurerm_user_assigned_identity exactly as described in the docs of azapi_resource.

When running terraform plan I get the message that the identity block in azapi_resource is not expected.

I'm using version 1.12.1 of azapi.

│ Error: embedded schema validation failed: the `body` is invalid:
│ `identity` is not expected here. Do you mean `id`?
│  You can try to update `azapi` provider to the latest version or disable the validation using the feature flag `schema_validation_enabled = false` within the resource block
│
│   with azapi_resource.connection,
│   on main.tf line 130, in resource "azapi_resource" "connection":
│  130: resource "azapi_resource" "connection" {
ms-henglu commented 5 months ago

Hello @smedegaard ,

Thank you for taking time to report this issue and apologize for late response.

I guess you're using the Microsoft.Web/connections resource. From its document, it doesn't support specifying an identity: https://learn.microsoft.com/en-us/azure/templates/microsoft.web/connections?pivots=deployment-language-terraform

Would you please share the document of the feature you want to use? I could help you make an azapi example.