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

Implement the 'group_by' and 'where' filters for cloudflare_notification_policy #2759

Closed
2 tasks done
r-kok opened this issue Sep 13, 2023 · 1 comment · Fixed by #2789
Closed
2 tasks done

Implement the 'group_by' and 'where' filters for cloudflare_notification_policy #2759

r-kok opened this issue Sep 13, 2023 · 1 comment · Fixed by #2789
Labels
kind/enhancement Categorizes issue or PR as related to improving an existing feature. triage/debug-log-attached Indicates an issue or PR has a complete Terraform debug log.

Comments

@r-kok
Copy link

r-kok commented Sep 13, 2023

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.7
on linux_amd64

Using previously-installed cloudflare/cloudflare v4.14.0

Affected resource(s)

cloudflare_notification_policy

Terraform configuration files

import {
  to = cloudflare_notification_policy.Advanced-Error-Rate-Alert
  id = "REDACTED_CLOUDFLARE_ACCOUNT_ID/REDACTED_NOTIFICATION_ID"
}

Link to debug output

https://gist.github.com/r-kok/a3a18e8cc5cb836c36ccc0f7379cb91f

Panic output

No response

Expected output

  • Resource imported succesfully
  • Terraform code generated succesfully (since I used the Terraform option '-generate-config-out=generated.tf')

Actual output

Planning failed. Terraform encountered an error while generating this plan.

│ Error: failed to set filters: Invalid address to set: []string{"filters", "0", "group_by"}

Steps to reproduce

  1. In the Cloudflare console, create a notification of type "Security Events Alert"
  2. Add domain(s) for this alert. Select one or more domains.
  3. Add targeted action(s) for this alert. Select the action "block".
  4. Save the notification
  5. Create a Terraform import block (see above)
  6. Run terraform plan to import the resource and generate terraform code:

TF_LOG=debug terraform plan -input=false -refresh=true -generate-config-out=generated.tf -detailed-exitcode -var-file=main.tfvars

Additional factoids

debug logging shows that "group_by"and "where" filters are not yet supported

References

similar to #2590

@r-kok r-kok 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 Sep 13, 2023
@github-actions
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 Sep 13, 2023
@jacobbednarz jacobbednarz added kind/enhancement Categorizes issue or PR as related to improving an existing feature. and removed 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 Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Categorizes issue or PR as related to improving an existing feature. triage/debug-log-attached Indicates an issue or PR has a complete Terraform debug log.
Projects
None yet
2 participants