Skip to content

Commit

Permalink
Merge pull request #10 from Flaconi/PLT-756-bot-config
Browse files Browse the repository at this point in the history
PLT-756 added bot-management to zone configuration
  • Loading branch information
vselcuk authored Dec 21, 2023
2 parents 0272170 + 8ac858e commit 6e9fe88
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,21 @@ list(object({

Default: `[]`

### <a name="input_bot_management"></a> [bot\_management](#input\_bot\_management)

Description: Cloudflare bot management configuration.

Type:

```hcl
object({
auto_update_model = optional(bool, false)
enable_js = optional(bool, false)
})
```

Default: `{}`

<!-- TFDOCS_INPUTS_END -->

<!-- TFDOCS_OUTPUTS_START -->
Expand Down
6 changes: 6 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,9 @@ resource "cloudflare_ruleset" "http_config_settings" {
}
}
}

resource "cloudflare_bot_management" "this" {
zone_id = cloudflare_zone.this.id
auto_update_model = var.bot_management.auto_update_model
enable_js = var.bot_management.enable_js
}
10 changes: 10 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,13 @@ variable "http_config_settings" {
}))
default = []
}

# https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/bot_management
variable "bot_management" {
description = "Cloudflare bot management configuration."
type = object({
auto_update_model = optional(bool, false)
enable_js = optional(bool, false)
})
default = {}
}

0 comments on commit 6e9fe88

Please sign in to comment.