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

cloudflare_tunnel_route: read by filtering list #1581

Merged
merged 1 commit into from
Apr 25, 2022

Conversation

terinjokes
Copy link
Contributor

The GetTunnelRouteForIP SDK function will return the first route that
either exactly matches the specified IP or larger CIDR. If routes exist
for both 10.0.0.0/8 and 10.0.0.0/24, and the latter is accidentally
deleted, the SDK function will start returning the former route.

This changeset resolves this issue by providing filters to the
ListTunnelRoutes such that the network subset and superset are both
the specific CIDR being managed. The API returns 1 result if there is an
exact match, and 0 results otherwise.

Bug: K8S-4828

The `GetTunnelRouteForIP` SDK function will return the first route that
either exactly matches the specified IP or larger CIDR. If routes exist
for both `10.0.0.0/8` and `10.0.0.0/24`, and the latter is accidentally
deleted, the SDK function will start returning the former route.

This changeset resolves this issue by providing filters to the
`ListTunnelRoutes` such that the network subset and superset are both
the specific CIDR being managed. The API returns 1 result if there is an
exact match, and 0 results otherwise.

Bug: K8S-4828
@jacobbednarz jacobbednarz merged commit 85cdb23 into cloudflare:master Apr 25, 2022
@github-actions github-actions bot added this to the v3.14.0 milestone Apr 25, 2022
@terinjokes terinjokes deleted the tunnel-route-reads branch April 25, 2022 22:51
@github-actions
Copy link
Contributor

github-actions bot commented May 3, 2022

This functionality has been released in v3.14.0 of the Terraform Cloudflare Provider.

Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@tjstansell
Copy link
Contributor

tjstansell commented May 10, 2022

Any chance we'll get a new cloudflare-go and terraform provider release soon to pick up the upstream changes? I tried to use the new cloudflare_tunnel_route resource and it keeps matching the wrong route (either a delete one or a larger one).

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.

3 participants