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_ruleset: An argument named "version" is not expected here. #4757

Closed
3 tasks done
robbert-nlo opened this issue Dec 12, 2024 · 5 comments
Closed
3 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

@robbert-nlo
Copy link

robbert-nlo commented Dec 12, 2024

Confirmation

  • This is a bug with an existing resource and is not a feature request or enhancement. Feature requests should be submitted with Cloudflare Support or your account team.
  • I have searched the issue tracker and my issue isn't already found.
  • I have replicated my issue using the latest version of the provider and it is still present.

Terraform and Cloudflare provider version

terraform 1.10.2
cloudflare 4.48.0

Affected resource(s)

cloudflare_ruleset

Terraform configuration files

resource "cloudflare_ruleset" "waf" {

(...)

  rules {
    action = "execute"
    action_parameters { 
      id      = local.cloudflare_managed_ruleset_id
      version = "latest"

(...)

Link to debug output

n/a

Panic output

│ Error: Unsupported argument

│ on modules/zone/managed_ruleset.tf line 115, in resource "cloudflare_ruleset" "waf":
│ 115: version = "latest"

│ An argument named "version" is not expected here.

Expected output

A successful plan with a deprecation warning

Actual output

Plan failed

Steps to reproduce

  1. Create a cloudflare_ruleset with a rules.actionparameters block containing a version argument.

Additional factoids

Apparently the version parameter was removed from rules.action_parameters in 4.48.0 without any deprecation period. This wasn't mentioned in the release notes and also the documentation still mentions the argument as existing.

References

No response

@robbert-nlo robbert-nlo 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 Dec 12, 2024
Copy link
Contributor

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.

Copy link
Contributor

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 Dec 12, 2024
@jacobbednarz jacobbednarz closed this as not planned Won't fix, can't repro, duplicate, stale Dec 12, 2024
@jacobbednarz
Copy link
Member

yes, it was called out in the release notes and CHANGELOG. the PR is #4697 if you would like to read more about it.

there was no deprecation period as the field(s) don't actually do anything in the Terraform configuration nor could they be configured to do anything that would change the behaviour.

@robbert-nlo
Copy link
Author

@jacobbednarz Hmm? I do not see anything about a removed version parameter in the release notes: https://github.com/cloudflare/terraform-provider-cloudflare/releases/tag/v4.48.0. Would make sense to mention breaking changes there.

I applaud the PR, however it would also be nice to account for existing configurations of customers still including to-be-removed arguments, whether or not the argument was a no-op. But I guess this is also a way of getting there, just somewhat more harsh.

In any case, it should be removed from the docs if it doesn't exist anymore.

@jacobbednarz
Copy link
Member

the source documentation has already been updated; see https://github.com/cloudflare/terraform-provider-cloudflare/blob/master/docs/resources/ruleset.md. there is an ongoing issue we've been working with Hashicorp on for the registry documentation not always reflecting the correct version. in the meantime, the GitHub repository is the best place to read the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Development

No branches or pull requests

2 participants