From 961b789c74973aff83071eb4526e847385a29979 Mon Sep 17 00:00:00 2001 From: David Haynes Date: Wed, 4 Nov 2020 14:17:04 -0800 Subject: [PATCH] Err check for importing aop resources now checks for three params rather than two - "I think off by one errors are turing tests to make sure the dev is human" - @wolfmd Closes #858 --- cloudflare/resource_cloudflare_authenticated_origin_pulls.go | 2 +- ...esource_cloudflare_authenticated_origin_pulls_certificate.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cloudflare/resource_cloudflare_authenticated_origin_pulls.go b/cloudflare/resource_cloudflare_authenticated_origin_pulls.go index 59d34daf6b..6a49735371 100644 --- a/cloudflare/resource_cloudflare_authenticated_origin_pulls.go +++ b/cloudflare/resource_cloudflare_authenticated_origin_pulls.go @@ -155,7 +155,7 @@ func resourceCloudflareAuthenticatedOriginPullsImport(d *schema.ResourceData, me // split the id so we can lookup idAttr := strings.SplitN(d.Id(), "/", 3) - if len(idAttr) != 2 { + if len(idAttr) != 3 { return nil, fmt.Errorf("invalid id (\"%s\") specified, should be in format \"zoneID/certID/hostname\"", d.Id()) } zoneID, certID, hostname := idAttr[0], idAttr[1], idAttr[2] diff --git a/cloudflare/resource_cloudflare_authenticated_origin_pulls_certificate.go b/cloudflare/resource_cloudflare_authenticated_origin_pulls_certificate.go index b9476554bd..3dd14f9478 100644 --- a/cloudflare/resource_cloudflare_authenticated_origin_pulls_certificate.go +++ b/cloudflare/resource_cloudflare_authenticated_origin_pulls_certificate.go @@ -202,7 +202,7 @@ func resourceCloudflareAuthenticatedOriginPullsCertificateImport(d *schema.Resou // split the id so we can lookup idAttr := strings.SplitN(d.Id(), "/", 3) - if len(idAttr) != 2 { + if len(idAttr) != 3 { return nil, fmt.Errorf("invalid id (\"%s\") specified, should be in format \"zoneID/type/certID\"", d.Id()) } zoneID, aopType, certID := idAttr[0], idAttr[1], idAttr[2]