Skip to content

Commit

Permalink
Merge pull request #818 from marc-barry/fix-fallback-origin-creation
Browse files Browse the repository at this point in the history
Fix to consider that a custom hostname fallback origin can move to active during a retry
  • Loading branch information
jacobbednarz authored Oct 11, 2020
2 parents 9b91a7b + a3a6294 commit 8f0b1cb
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,9 @@ func resourceCloudflareCustomHostnameFallbackOriginCreate(d *schema.ResourceData
}

// Address an eventual consistency issue where deleting a fallback hostname
// and then adding it _may_ cause some issues. We don't expect "active" here
// as some resources (such as DNS records) will be created while the
// deployment is in progress.
if fallbackHostname.Status != "pending_deployment" {
// and then adding it _may_ cause some issues. It is possible that the status does
// move into the active state during the retry period.
if fallbackHostname.Status != "pending_deployment" && fallbackHostname.Status != "active" {
return resource.RetryableError(fmt.Errorf("expected custom hostname fallback to be created but was %s", fallbackHostname.Status))
}

Expand Down

0 comments on commit 8f0b1cb

Please sign in to comment.