Skip to content

fix: drop lockdown_default_seclist to eliminate security-list race#115

Closed
yuhuyoyo wants to merge 1 commit into
masterfrom
worktree-fix-109-lockdown-seclist
Closed

fix: drop lockdown_default_seclist to eliminate security-list race#115
yuhuyoyo wants to merge 1 commit into
masterfrom
worktree-fix-109-lockdown-seclist

Conversation

@yuhuyoyo
Copy link
Copy Markdown
Contributor

What

Set lockdown_default_seclist = false in module.vcn in both datadog-terraform-onboarding and datadog-integration regional-stacks modules.

Why

Two Terraform resources were both managing the same VCN default security list, causing a race condition on terraform apply:

  1. module.vcn[0].oci_core_default_security_list.lockdown — created by the upstream oracle-terraform-modules/vcn/oci module when lockdown_default_seclist = true. It zeroes out all egress/ingress rules and uses ignore_changes on them.
  2. oci_core_default_security_list.dd_default — our resource that sets egress-all + minimal ICMP ingress (no SSH).

Both fired UpdateSecurityList PUTs within ~150 ms during apply (confirmed in OCI audit logs). When the upstream lockdown resource won the race, all egress rules were wiped. Functions could no longer reach OCIR to pull their images, and every Service Connector Hub invocation returned:

{"code":"FunctionInvokeImageNotAvailable","message":"Failed to pull function image"}  (502)

With lockdown_default_seclist = false, the upstream module never creates the conflicting resource. dd_default becomes the sole owner of the default security list with the correct rules — preserving the security posture from PR #99 (no SSH ingress, egress-all for OCIR reachability).

Fixes #109

)

Two Terraform resources both called UpdateSecurityList on the same VCN
default security list:
1. The upstream oracle-terraform-modules/vcn/oci lockdown resource
   (enabled by lockdown_default_seclist = true) — zeroes all rules,
   has ignore_changes on egress/ingress.
2. oci_core_default_security_list.dd_default — sets egress-all + ICMP
   ingress only.

Both fired within ~150 ms on terraform apply. When lockdown won the
race it wiped egress rules, blocking Functions from reaching OCIR and
causing FunctionInvokeImageNotAvailable (502) on every invocation.

Fix: set lockdown_default_seclist = false so the upstream module never
creates the conflicting resource. dd_default becomes the sole owner of
the default security list and already provides the intended locked-down
rule set (no SSH ingress, egress-all for OCIR reachability).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@yuhuyoyo yuhuyoyo closed this May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dd-metrics-forwarder and dd-logs-forwarder error with FunctionInvokeImageNotAvailable

1 participant