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

produced an unexpected new value: block count changed from 355 to 350. │ This is a bug in the provider, which should be reported in the provider's own issue tracker. #3758

Closed
3 tasks done
VinothKumaranbalagan opened this issue Aug 23, 2024 · 4 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. triage/debug-log-attached Indicates an issue or PR has a complete Terraform debug log. triage/needs-information Indicates an issue needs more information in order to work on it.

Comments

@VinothKumaranbalagan
Copy link

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

TF_VERSION: 1.7.3

Affected resource(s)

My plan was perfect when I try apply it shows an error but my changes are reflected. Still my apply throws error.

Terraform configuration files

rules {
    description = "CF Managed ruleset"
    action      = "execute"
    expression  = "true"
    enabled     = true
    action_parameters {
      id = "efb7b8c949ac4650a09736fc376e9aee"
      matched_data {
         public_key = "RNVswpeLJZUutHHUnCkXLIVY5X0B6H5z+q2KCheealk="
      }
      overrides {
        action = "log"
        enabled = "true"
        dynamic "rules" {
          for_each = { for rule in var.managed_ruleset_overrides : rule.rule_id => rule }
          content {
            id = rules.value.rule_id
            action = rules.value.action
            enabled = rules.value.status // All rules should be enabled
          }
        }

      }
    }
  }

Link to debug output

https://gist.github.com/VinothKumaranbalagan/0d22fdd736cbdd3602387d2c26c5bccc

Panic output

No response

Expected output

Apply all over rides with any error.

Actual output

module.waf_rulesets.cloudflare_ruleset.cf_managed_ruleset: Modifying... [id=5d726c2f5a08429fb8413485d5f44612]
module.waf_rulesets.cloudflare_ruleset.cf_managed_ruleset: Still modifying... [id=5d726c2f5a08429fb8413485d5f44612, 10s elapsed]

Error: Provider produced inconsistent result after apply

When applying changes to
module.waf_rulesets.cloudflare_ruleset.cf_managed_ruleset, provider
"provider["registry.terraform.io/cloudflare/cloudflare"]" produced an
unexpected new value: .rules[2].action_parameters[0].overrides[0].rules:
block count changed from 355 to 350.

This is a bug in the provider, which should be reported in the provider's own
issue tracker.

Steps to reproduce

Try to create an override Rule for all the remaining rules in Managed Rulesets. Have all rule id in tfvars or in main try to run terraform apply.

Additional factoids

No response

References

No response

@VinothKumaranbalagan VinothKumaranbalagan 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 Aug 23, 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.

@github-actions github-actions bot added the triage/debug-log-attached Indicates an issue or PR has a complete Terraform debug log. label Aug 23, 2024
Copy link
Contributor

Thank you for opening this issue and sorry to hear you're hitting issues. Unfortunately, the reproduction case provided contains HCL dynamic expressions. Examples of these are:

Maintainers don't accept these as reproduction cases since using these constructs and expressions can hold their own logic bugs which are outside of the provider and not able to be diagnosed.

For maintainers to triage this issue, we recommend providing a minimal reproduction test case that is only contains the impacted resources and can be easily reproduced in an isolated environment. Without providing this, maintainers are limited in what support they can provide.

@github-actions github-actions bot added the triage/needs-information Indicates an issue needs more information in order to work on it. label Aug 23, 2024
Copy link
Contributor

Marking this issue as stale due to 30 days of inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 7 days it will automatically be closed. Maintainers can also remove the lifecycle/stale label.
If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

Copy link
Contributor

This issue was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 30, 2024
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. lifecycle/stale needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. triage/debug-log-attached Indicates an issue or PR has a complete Terraform debug log. triage/needs-information Indicates an issue needs more information in order to work on it.
Projects
None yet
Development

No branches or pull requests

1 participant