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

resource/custom_hostname: Ensure Import stores hostname #788

Conversation

jacobbednarz
Copy link
Member

Within the Read function, we weren't setting the hostname to the
imported value (assuming it was always provided) which has left it
missing in state and subsequently causing replacements unnecessarily.

Fixes #783

Within the `Read` function, we weren't setting the hostname to the
imported value (assuming it was always provided) which has left it
missing in state and subsequently causing replacements unnecessarily.

Fixes cloudflare#783
ImportStateIdPrefix: fmt.Sprintf("%s/", zoneID),
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"ssl.#", "ssl.0.certificate_authority", "ssl.0.cname_name", "ssl.0.cname_target", "ssl.0.custom_certificate", "ssl.0.custom_key", "ssl.0.method", "ssl.0.status", "ssl.0.type", "ssl.0.wildcard"},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we're not providing these in the resource, the ImportStateVerify will always fail. Remove them from the check and just assert on the values we know we have.

@patryk patryk merged commit 2c6198f into cloudflare:master Sep 7, 2020
@patryk
Copy link
Contributor

patryk commented Sep 7, 2020

Thanks.

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.

cloudflare_custom_hostname import does not import anything
2 participants