terraform-provider-databricks
terraform-provider-databricks copied to clipboard
[ISSUE] Issue with `databricks_mws_ncc_private_endpoint_rule` resource
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
I've tested it also in provider 1.74.0 and problem is the same.
d.Pack() is doing that.