From 66a28207733bf533a24331218a89c73379052449 Mon Sep 17 00:00:00 2001 From: Reinier Kip Date: Tue, 17 Jun 2025 16:02:27 +1200 Subject: [PATCH] Match up expected import identifier errors with actual format --- internal/provider/dns_record_resource.go | 2 +- internal/provider/environment_variable_resource.go | 2 +- internal/provider/waf_policy_resource.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/provider/dns_record_resource.go b/internal/provider/dns_record_resource.go index c253555..c6110e4 100644 --- a/internal/provider/dns_record_resource.go +++ b/internal/provider/dns_record_resource.go @@ -290,7 +290,7 @@ func (r *dnsRecordResource) Delete(ctx context.Context, req resource.DeleteReque func (r *dnsRecordResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { idParts := strings.Split(req.ID, ":") - errorMessage := fmt.Sprintf("Expected import identifier in the formats: zone_id,record_id. Got: %q", req.ID) + errorMessage := fmt.Sprintf("Expected import identifier in the formats: zone_id:record_id. Got: %q", req.ID) if len(idParts) == 2 { if idParts[0] == "" || idParts[1] == "" { diff --git a/internal/provider/environment_variable_resource.go b/internal/provider/environment_variable_resource.go index 760730d..00fc857 100644 --- a/internal/provider/environment_variable_resource.go +++ b/internal/provider/environment_variable_resource.go @@ -388,7 +388,7 @@ func (r *environmentVariableResource) Delete(ctx context.Context, req resource.D func (r *environmentVariableResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { idParts := strings.Split(req.ID, ":") - errorMessage := fmt.Sprintf("Expected import identifier with one of these formats: team_id,key or team_id,site_id,key. Got: %q", req.ID) + errorMessage := fmt.Sprintf("Expected import identifier with one of these formats: team_id:key or team_id:site_id:key. Got: %q", req.ID) if len(idParts) == 2 { if idParts[0] == "" || idParts[1] == "" { diff --git a/internal/provider/waf_policy_resource.go b/internal/provider/waf_policy_resource.go index 2ab93da..f741b24 100644 --- a/internal/provider/waf_policy_resource.go +++ b/internal/provider/waf_policy_resource.go @@ -286,7 +286,7 @@ func (r *wafPolicyResource) Delete(ctx context.Context, req resource.DeleteReque func (r *wafPolicyResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { idParts := strings.Split(req.ID, ":") - errorMessage := fmt.Sprintf("Expected import identifier in the formats: team_id,waf_policy_id. Got: %q", req.ID) + errorMessage := fmt.Sprintf("Expected import identifier in the formats: team_id:waf_policy_id. Got: %q", req.ID) if len(idParts) == 2 { if idParts[0] == "" || idParts[1] == "" {