🚀 Enhancements
Bump cloudposse/cloudwatch-events/aws to 0.10.0 for 6-dimension label support Andriy Knysh (@aknysh) (#107)
## what- Bump the internal
cloudwatch_eventsub-module (used whencloudwatch_forwarder_event_patternsis set) fromcloudposse/cloudwatch-events/aws0.6.1→0.10.0inlambda-log.tf - Extend
examples/complete/fixtures.us-east-2.tfvarswithtenant = "someval"and an explicit 6-dimensionlabel_orderso the bug path is exercised in CI going forward - Update the
TestExamplesCompleteLambda-name assertion to include the newtenantcomponent (eg-someval-ue2-test-…) - Refresh
test/src/go.modto Go1.26.1and bump all test dependencies to latest compatible versions; regeneratego.sum
why
-
The pinned
cloudwatch-events0.6.1transitively pullscloudposse/label/null0.22.0, which only understands the 5 classic label dimensions (namespace,environment,stage,name,attributes). It does not know abouttenant. -
When a consumer passes a context whose
label_orderincludes"tenant"— standard practice in multi-tenant Cloud Posse setups —terraform planfails with:Error: Invalid index on .terraform/modules/….cloudwatch_event.rule_label/main.tf line 86 local.id_context is object with 5 attributesbecause the 6th dimension key (
tenant) doesn't exist in v0.22.0'sid_context. -
cloudwatch-events0.10.0pinslabel/null0.25.0, which introducedtenant(andlabel_key_case/label_value_case/descriptor_formats/labels_as_tags). Bumping the transitive sub-module resolves the lookup failure for every downstream consumer that usescloudwatch_forwarder_event_patternswith a multi-tenant label order. -
The existing
examples/completefixture already setscloudwatch_forwarder_event_patterns(with aguarddutyentry) but had notenantinlabel_order, so the bug path was never exercised in CI — which is why this went undetected. Addingtenantto the fixture closes the coverage gap. -
Patch-level change: no public interface additions/removals; purely a transitive sub-module bump that fixes a runtime failure.
references
-
cloudposse/terraform-null-labelv0.25.0 release notes (introducestenant): https://github.com/cloudposse/terraform-null-label/releases/tag/0.25.0 -
cloudposse/terraform-aws-cloudwatch-eventsv0.10.0 (useslabel/null0.25.0): https://github.com/cloudposse/terraform-aws-cloudwatch-events/releases/tag/v0.10.0 -
Symptom (multi-tenant Cloud Posse consumer):
Error: Invalid index on .terraform/modules/datadog_lambda_forwarder.cloudwatch_event.rule_label/main.tf line 86 local.id_context is object with 5 attributes local.id_context[l] — The given key does not identify an element in this collection value.