Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix to consider that a custom hostname fallback origin can move to active during a retry #818

Merged

Conversation

marc-barry
Copy link
Contributor

We have been trying to use the new custom hostname fallback origin creation functionality of the provider and consistently hit the following error:

Error: expected custom hostname fallback to be created but was active

I traced the issue to the following condition:

if fallbackHostname.Status != "pending_deployment" {	
    return resource.RetryableError(fmt.Errorf("expected custom hostname fallback to be created but was %s", fallbackHostname.Status))
}

The issue is that our custom hostname fallback origins from the https://api.cloudflare.com/#custom-hostname-fallback-origin-for-a-zone-properties API calls end up in the active state during the retry period. The retry logic didn't account for that state change and thus our custom domain fallback origin creation fails.

@jacobbednarz
Copy link
Member

Thanks for this one @marc-barry! Are you able to remove go.sum and we can get this one merged?

@marc-barry
Copy link
Contributor Author

Thanks for this one @marc-barry! Are you able to remove go.sum and we can get this one merged?

@jacobbednarz I reverted the go.sum back to its original state in def1b37.

…ion that it can move into an active state and thus the creation never will converge on success. This commit addresses the case that the state does move to active during the retry period.
@marc-barry marc-barry force-pushed the fix-fallback-origin-creation branch from def1b37 to a3a6294 Compare October 10, 2020 01:07
@jacobbednarz jacobbednarz merged commit 8f0b1cb into cloudflare:master Oct 11, 2020
@marc-barry marc-barry deleted the fix-fallback-origin-creation branch October 13, 2020 18:30
boekkooi-lengoo pushed a commit to boekkooi-lengoo/terraform-provider-cloudflare that referenced this pull request Feb 28, 2022
…ctions/golangci/golangci-lint-action-3

build(deps): bump golangci/golangci-lint-action from 2 to 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants