diff --git a/.changelog/2833.txt b/.changelog/2833.txt new file mode 100644 index 0000000000..b848d63f6c --- /dev/null +++ b/.changelog/2833.txt @@ -0,0 +1,3 @@ +```release-note:bug +resource/cloudflare_bot_management: fix fight mode not being sent to API +``` diff --git a/internal/sdkv2provider/resource_cloudflare_bot_management.go b/internal/sdkv2provider/resource_cloudflare_bot_management.go index 83499aef72..f5297202f4 100644 --- a/internal/sdkv2provider/resource_cloudflare_bot_management.go +++ b/internal/sdkv2provider/resource_cloudflare_bot_management.go @@ -125,7 +125,7 @@ func buildBotManagementParams(d *schema.ResourceData) cloudflare.UpdateBotManage bm.EnableJS = cloudflare.BoolPtr(val.(bool)) } if val, exists := d.GetOkExists("fight_mode"); exists { - bm.EnableJS = cloudflare.BoolPtr(val.(bool)) + bm.FightMode = cloudflare.BoolPtr(val.(bool)) } if val, exists := d.GetOkExists("sbfm_definitely_automated"); exists {