Skip to content

Commit

Permalink
Merge pull request cloudflare#4496 from Cyb3r-Jak3/remove-region-from…
Browse files Browse the repository at this point in the history
…-turnstile

Remove region from turnstile update
  • Loading branch information
jacobbednarz authored Nov 5, 2024
2 parents 86cd874 + 649994a commit c31d080
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/4496.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/turnstile: Force recreate on region update
```
1 change: 0 additions & 1 deletion internal/framework/service/turnstile/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ func (r *TurnstileWidgetResource) Update(ctx context.Context, req resource.Updat
Domains: widget.Domains,
Mode: widget.Mode,
BotFightMode: widget.BotFightMode,
Region: widget.Region,
})

if err != nil {
Expand Down
3 changes: 3 additions & 0 deletions internal/framework/service/turnstile/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ func (r *TurnstileWidgetResource) Schema(ctx context.Context, req resource.Schem
Validators: []validator.String{
stringvalidator.OneOf("world"),
},
PlanModifiers: []planmodifier.String{
stringplanmodifier.RequiresReplace(),
},
},
"bot_fight_mode": schema.BoolAttribute{
MarkdownDescription: "If bot_fight_mode is set to true, Cloudflare issues computationally expensive challenges in response to malicious bots (Enterprise only).",
Expand Down

0 comments on commit c31d080

Please sign in to comment.