refactor: hoist CDN block_ips to a variable #81

Merged
pat-s merged 1 commit from pr/cdn-tf-block-ips-var into main 2026-06-08 08:29:07 +00:00
Owner

Summary

block_ips = ["185.172.53.0"] was duplicated in both bunnynet_pullzone resources in cdn.tf. Move it to a typed cdn_block_ips variable in vars.tf with the existing IP as the default.

  • No plan diff on apply — same value, just sourced from var.cdn_block_ips instead of a literal.
  • Adding/removing IPs is now a one-line var override (or a default change) instead of two edits in the resource bodies.

Interaction with #80 (for_each refactor)

#80 collapses the two pullzones to bunnynet_pullzone.this[for_each]. Either order works; whichever lands second is a trivial one-line rebase on the surviving block_ips = line.

## Summary `block_ips = ["185.172.53.0"]` was duplicated in both `bunnynet_pullzone` resources in `cdn.tf`. Move it to a typed `cdn_block_ips` variable in `vars.tf` with the existing IP as the default. - No plan diff on apply — same value, just sourced from `var.cdn_block_ips` instead of a literal. - Adding/removing IPs is now a one-line var override (or a default change) instead of two edits in the resource bodies. ## Interaction with #80 (for_each refactor) `#80` collapses the two pullzones to `bunnynet_pullzone.this[for_each]`. Either order works; whichever lands second is a trivial one-line rebase on the surviving `block_ips =` line.
block_ips was hardcoded in both pullzones as a single IP
("185.172.53.0"). Move it to a variable so updates don't require
editing the resource bodies (and so a future for_each refactor
doesn't bake the list into the map).

Default keeps the existing entry; no plan diff on apply.
pat-s merged commit 35dafab737 into main 2026-06-08 08:29:07 +00:00
pat-s deleted branch pr/cdn-tf-block-ips-var 2026-06-08 08:29:07 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
devxy/build-cran-binaries!81
No description provided.