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 for deleting per hostname authenticated origin pulls #3680

Merged
merged 2 commits into from
Nov 28, 2024

Conversation

PhilipSkinner
Copy link

Description

Fixes an issue with the authenticated origin pulls per hostname where the API docs state that in order to delete an instance the enabled flag must be set to null.

API docs can be found here:

https://developers.cloudflare.com/api/operations/per-hostname-authenticated-origin-pull-enable-or-disable-a-hostname-for-client-authentication

This fix is required to correct an issue with the cloudflare terraform provider which is currently failing to destroy these resources correctly.

This can lead to a hard lock of mtls certificates and origin pulls configured on them as the cloudflare API contains validation bugs on the endpoint documented on the URL above.

Issue raised on the terraform provider:

cloudflare/terraform-provider-cloudflare#4648

PR raised to fix this on the terraform provider:

cloudflare/terraform-provider-cloudflare#4649

Has your change been tested?

Unit tests have been extended to ensure that nil is allowed as a value when making this PUT request.

Types of changes

What sort of change does your code introduce/modify?

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • This change is using publicly documented in cloudflare/api-schemas
    and relies on stable APIs.

Copy link
Contributor

github-actions bot commented Nov 27, 2024

changelog detected ✅

the API docs state that in order to delete an instance the enabled
flag must be set to null.

API docs can be found here:

https://developers.cloudflare.com/api/operations/per-hostname-authenticated-origin-pull-enable-or-disable-a-hostname-for-client-authentication

This fix is required to correct an issue with the cloudflare terraform
provider which is currently failing to destroy these resources correctly.

This can lead to a hard lock of mtls certificates and origin pulls configured
on them as the cloudflare API contains validation bugs on the endpoint
documented on the URL above.

Issue raised on the terraform provider:

cloudflare/terraform-provider-cloudflare#4648

PR raised to fix this on the terraform provider:

cloudflare/terraform-provider-cloudflare#4649
.changelog/3680.txt Outdated Show resolved Hide resolved
@jacobbednarz jacobbednarz merged commit 11a494d into cloudflare:master Nov 28, 2024
7 checks passed
@github-actions github-actions bot added this to the v0.111.0 milestone Nov 28, 2024
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