Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions internal/app/cf-terraforming/cmd/generate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ func TestResourceGenerationV5(t *testing.T) {
"cloudflare address map": {identiferType: "account", resourceType: "cloudflare_address_map", testdataFilename: "cloudflare_address_map"},
"cloudflare account member": {identiferType: "account", resourceType: "cloudflare_account_member", testdataFilename: "cloudflare_account_member"},
"cloudflare api shield operation": {identiferType: "zone", resourceType: "cloudflare_api_shield_operation", testdataFilename: "cloudflare_api_shield_operation"},
"cloudflare bot management": {identiferType: "zone", resourceType: "cloudflare_bot_management", testdataFilename: "cloudflare_bot_management"},
// "cloudflare argo": {identiferType: "zone", resourceType: "cloudflare_argo", testdataFilename: "cloudflare_argo"},
// "cloudflare bot management": {identiferType: "zone", resourceType: "cloudflare_bot_management", testdataFilename: "cloudflare_bot_management"},
// "cloudflare BYO IP prefix": {identiferType: "account", resourceType: "cloudflare_byo_ip_prefix", testdataFilename: "cloudflare_byo_ip_prefix"},
Expand Down
38 changes: 38 additions & 0 deletions testdata/cloudflare/v5/cloudflare_bot_management.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
version: 1
interactions:
- request:
body: ""
form: {}
headers:
Content-Type:
- application/json
url: https://api.cloudflare.com/client/v4/zones/0da42c8d2132a9ddaf714f9e7c920711/bot_management
method: GET
response:
body: |
{
"errors": [],
"messages": [],
"result": {
"ai_bots_protection": "disabled",
"enable_js": true,
"is_robots_txt_managed": false,
"optimize_wordpress": true,
"sbfm_definitely_automated": "managed_challenge",
"sbfm_likely_automated": "block",
"sbfm_static_resource_protection": false,
"sbfm_verified_bots": "allow",
"suppress_session_score": false,
"using_latest_model": true
},
"success": true
}
headers:
Content-Type:
- application/json
Vary:
- Accept-Encoding
status: 200 OK
code: 200
duration: ""
14 changes: 10 additions & 4 deletions testdata/terraform/v5/cloudflare_bot_management/test.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
resource "cloudflare_bot_management" "terraform_managed_resource" {
zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
ai_bots_protection = "block"
enable_js = true
fight_mode = true
ai_bots_protection = "disabled"
enable_js = true
optimize_wordpress = true
sbfm_definitely_automated = "managed_challenge"
sbfm_likely_automated = "block"
sbfm_static_resource_protection = false
sbfm_verified_bots = "allow"
suppress_session_score = false
zone_id = "0da42c8d2132a9ddaf714f9e7c920711"
}

Loading