mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
Creating an aws_cloudfront_distribution against floci crashes the Terraform/
pulumi AWS provider on read-back: DefaultCacheBehavior (and CacheBehavior) omit
the TrustedSigners object, but the provider does len(dcb.TrustedSigners.Items)
with no nil guard (flattenDefaultCacheBehavior), so an omitted object is a nil
pointer dereference (SIGSEGV) that kills the apply and orphans the distribution.
Floci models only the modern TrustedKeyGroups, but real AWS always echoes a
TrustedSigners object even when unused ({Enabled:false, Quantity:0}). Emit that
disabled form in both cache-behavior writers, next to TrustedKeyGroups.
Refs #2767 (the TrustedSigners crash; the ForwardedValues/MinTTL and
AllowedMethods.CachedMethods fidelity gaps listed there are left as follow-ups).
Adds a regression test asserting getDistribution's DefaultCacheBehavior echoes a
disabled TrustedSigners; it fails (object absent) before the fix.