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

Provider doesn't support the replay_protection value when creating a cloudflare_ipsec_tunnel #3235

Closed
2 tasks done
Sceptyre opened this issue Apr 9, 2024 · 4 comments · Fixed by #3249
Closed
2 tasks done
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/needs-information Indicates an issue needs more information in order to work on it.

Comments

@Sceptyre
Copy link
Contributor

Sceptyre commented Apr 9, 2024

Confirmation

  • My issue isn't already found on the issue tracker.
  • I have replicated my issue using the latest version of the provider and it is still present.

Terraform and Cloudflare provider version

Terraform v1.5.4
on windows_amd64
+ provider registry.terraform.io/cloudflare/cloudflare v4.29.0

Affected resource(s)

  • cloudflare_ipsec_tunnel

Terraform configuration files

resource "cloudflare_ipsec_tunnel" "example" {
  account_id           = var.cloudflare_account_id
  name                 = "example_tunnel"
  customer_endpoint    = "1.2.3.4"
  cloudflare_endpoint  = "<insert anycast ip>"
  interface_address    = "192.168.1.2/31"
  health_check_enabled = true
  health_check_target  = "192.168.1.3"
  health_check_type    = "request"
  psk                  = "<insert psk>"
  allow_null_cipher    = false
  # No option to set the replay_protection value. Always defaults to false
}

Link to debug output

n/a

Panic output

No response

Expected output

Expected ability to be able to configure replay_protection

Actual output

Unable to configure replay_protection

Steps to reproduce

  1. Create a basic cloudflare_ipsec_tunnel resource
  2. Attempt to set a replay_protection value
  3. Check documentation, find no mapping for that value
  4. Review provider code, find no code to support that mapping

Additional factoids

The link below is to the Cloudflare terraform provider documentation. It appears that the provider doesn't support the ability to enable replay protection.
cloudflare_ipsec_tunnel | Resources | cloudflare/cloudflare | Terraform | Terraform Registry

You can see within the codebase itself, within the read function, it doesn't reference the replay_protection value
terraform-provider-cloudflare/internal/sdkv2provider/resource_cloudflare_ipsec_tunnel.go at master · cloudflare/terraform-provider-cloudflare (github.com)

You can see within the List IPsec Tunnels API call however that Cloudflare does expose it
Cloudflare API Documentation

References

No response

@Sceptyre Sceptyre added kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Apr 9, 2024
Copy link
Contributor

github-actions bot commented Apr 9, 2024

Thank you for reporting this issue! For maintainers to dig into issues it is required that all issues include the entirety of TF_LOG=DEBUG output to be provided. The only parts that should be redacted are your user credentials in the X-Auth-Key, X-Auth-Email and Authorization HTTP headers. Details such as zone or account identifiers are not considered sensitive but can be redacted if you are very cautious. This log file provides additional context from Terraform, the provider and the Cloudflare API that helps in debugging issues. Without it, maintainers are very limited in what they can do and may hamper diagnosis efforts.

This issue has been marked with triage/needs-information and is unlikely to receive maintainer attention until the log file is provided making this a complete bug report.

@github-actions github-actions bot added triage/needs-information Indicates an issue needs more information in order to work on it. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Apr 9, 2024
Copy link
Contributor

github-actions bot commented Apr 9, 2024

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@Sceptyre
Copy link
Contributor Author

Sceptyre commented Apr 9, 2024

It appears the cloudflare-go module itself doesn't have Replay Protection defined in the struct.
https://github.com/cloudflare/cloudflare-go/blob/v0.92.0/magic_transit_ipsec_tunnel.go#L31

@Sceptyre Sceptyre changed the title Provider doesn't support the replay_protection value when Provider doesn't support the replay_protection value when creating a cloudflare_ipsec_tunnel Apr 9, 2024
@Sceptyre
Copy link
Contributor Author

Sceptyre commented Apr 9, 2024

Appears to be related to an issue with the cloudflare-go module not supporting this attribute. PR has been submitted to add this functionality:
cloudflare/cloudflare-go#1710

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/needs-information Indicates an issue needs more information in order to work on it.
Projects
None yet
1 participant