terraform-provider-databricks icon indicating copy to clipboard operation
terraform-provider-databricks copied to clipboard

[ISSUE] Issue with `databricks_mws_ncc_private_endpoint_rule` resource

Open sebastianczech opened this issue 7 months ago • 1 comments
trafficstars

Configuration

terraform import terraform_id azure_resource_id

Expected Behavior

It's expected that existing resource is imported to Terraform state.

For other resources it's implemented by calling function d.SetId():

https://github.com/databricks/terraform-provider-databricks/blob/6ca275b65a99d91cfe537d1fe8607192c7eaafba/repos/resource_repo.go#L203

For databricks_mws_ncc_private_endpoint_rule it's missing here:

https://github.com/databricks/terraform-provider-databricks/blob/6ca275b65a99d91cfe537d1fe8607192c7eaafba/mws/resource_mws_ncc_private_endpoint_rule.go#L25-L39

Actual Behavior

Error: The provider returned a resource missing an identifier during ImportResourceState. This is generally a bug in the resource implementation for import. Resource import code should not call d.SetId("") or create an empty ResourceData. If the resource is missing, instead return an error. Please report this to the provider developers.

Terraform and provider versions

Terraform 1.63.0, provider 1.71.0

sebastianczech avatar Apr 08 '25 13:04 sebastianczech

I've tested it also in provider 1.74.0 and problem is the same.

sebastianczech avatar Apr 17 '25 14:04 sebastianczech

d.Pack() is doing that.

alexott avatar Aug 22 '25 09:08 alexott