Skip to content

Commit cff34a4

Browse files
rjkipsarahetter
andauthored
Match up expected import identifier errors with actual format (#120)
Co-authored-by: Sarah Etter <sarah.etter@netlify.com>
1 parent b99ad7c commit cff34a4

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

internal/provider/dns_record_resource.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ func (r *dnsRecordResource) Delete(ctx context.Context, req resource.DeleteReque
290290
func (r *dnsRecordResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) {
291291
idParts := strings.Split(req.ID, ":")
292292

293-
errorMessage := fmt.Sprintf("Expected import identifier in the formats: zone_id,record_id. Got: %q", req.ID)
293+
errorMessage := fmt.Sprintf("Expected import identifier in the formats: zone_id:record_id. Got: %q", req.ID)
294294

295295
if len(idParts) == 2 {
296296
if idParts[0] == "" || idParts[1] == "" {

internal/provider/environment_variable_resource.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ func (r *environmentVariableResource) Delete(ctx context.Context, req resource.D
388388
func (r *environmentVariableResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) {
389389
idParts := strings.Split(req.ID, ":")
390390

391-
errorMessage := fmt.Sprintf("Expected import identifier with one of these formats: team_id,key or team_id,site_id,key. Got: %q", req.ID)
391+
errorMessage := fmt.Sprintf("Expected import identifier with one of these formats: team_id:key or team_id:site_id:key. Got: %q", req.ID)
392392

393393
if len(idParts) == 2 {
394394
if idParts[0] == "" || idParts[1] == "" {

internal/provider/waf_policy_resource.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ func (r *wafPolicyResource) Delete(ctx context.Context, req resource.DeleteReque
286286
func (r *wafPolicyResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) {
287287
idParts := strings.Split(req.ID, ":")
288288

289-
errorMessage := fmt.Sprintf("Expected import identifier in the formats: team_id,waf_policy_id. Got: %q", req.ID)
289+
errorMessage := fmt.Sprintf("Expected import identifier in the formats: team_id:waf_policy_id. Got: %q", req.ID)
290290

291291
if len(idParts) == 2 {
292292
if idParts[0] == "" || idParts[1] == "" {

0 commit comments

Comments
 (0)