Skip to content

Conversation

@philippschulte
Copy link
Member

@philippschulte philippschulte commented Nov 17, 2025

Change summary

Fixes #1148.

Previously, changes to ddos_protection.mode (e.g. from "block" to "log") were not sent to the Fastly API if the target mode was "log", due to a conditional check that skipped the update. This caused persistent diffs and unexpected behavior.

This pull request removes the conditional check and ensures that mode updates are always sent when ddos_protection is enabled.

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Changes to Core Features:

  • Have you written new tests for your core changes, as applicable?
  • Have you successfully run tests with your changes locally?
=== RUN   TestAccFastlyServiceVCLProductEnablement_basic
=== PAUSE TestAccFastlyServiceVCLProductEnablement_basic
=== CONT  TestAccFastlyServiceVCLProductEnablement_basic
--- PASS: TestAccFastlyServiceVCLProductEnablement_basic (14.98s)
=== RUN   TestAccFastlyServiceVCLProductEnablement_ddosProtectionModeChange
=== PAUSE TestAccFastlyServiceVCLProductEnablement_ddosProtectionModeChange
=== CONT  TestAccFastlyServiceVCLProductEnablement_ddosProtectionModeChange
--- PASS: TestAccFastlyServiceVCLProductEnablement_ddosProtectionModeChange (41.45s)

Copy link
Contributor

@kpfleming kpfleming left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, thanks for the fix. I wonder if we have any other 'optimizations' in place which do similar things.

@philippschulte philippschulte merged commit 046ff80 into fastly:main Nov 17, 2025
23 checks passed
@philippschulte philippschulte deleted the pschulte/fix-for-1148 branch November 17, 2025 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Not possible to change ddos_protection mode in fastly_service_vcl resource

3 participants