Skip to content

Commit

Permalink
Merge pull request #859 from dhaynespls/dhaynes/858-off-by-one
Browse files Browse the repository at this point in the history
Err check for importing aop resources now checks for three params rather than two
  • Loading branch information
jacobbednarz authored Nov 4, 2020
2 parents 8afde29 + 961b789 commit 4766fe9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 4766fe9

Please sign in to comment.