cloudflare / terraform-provider-cloudflare

Cloudflare Terraform Provider
https://registry.terraform.io/providers/cloudflare/cloudflare
Mozilla Public License 2.0
799 stars 619 forks source link

cloudflare_bot_management resource disabling un-managed feature "Block AI Scrapers and Crawlers" #3673

Open pnatel opened 3 months ago

pnatel commented 3 months ago

Confirmation

Terraform and Cloudflare provider version

Terraform v1.9.2 on darwin_arm64

Affected resource(s)

resource "cloudflare_bot_management"

Terraform configuration files

resource "cloudflare_bot_management" "bot_management" {
  enable_js              = true
  fight_mode             = true
  zone_id                = var.cloudflare_zone_id
  auto_update_model      = true
  suppress_session_score = false
}

Link to debug output

N/A

Panic output

N/A

Expected output

when updating the resource "cloudflare_bot_management", it should only change configuration within its scope.

Actual output

The previously UI activated "Block AI Scrapers and Crawlers" gets disabled after updating the resource "cloudflare_bot_management" image

Steps to reproduce

  1. Have the resource "cloudflare_bot_management" previously applied
  2. manually enable the "Block AI Scrapers and Crawlers" option (There is no resource option to enable this via Terraform)
  3. apply a change in the resource "cloudflare_bot_management" (update any optional item)
  4. Check that the "Block AI Scrapers and Crawlers" option is now disabled (unwanted)

Additional factoids

I believe the "Block AI Scrapers and Crawlers" option should be managed by the resource "cloudflare_bot_management", however, if that is not the case, then it should not interfere with the option enabled in the UI.

References

No response

github-actions[bot] commented 3 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

github-actions[bot] commented 3 months ago

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[bot] commented 3 months ago

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.