Skip to content

test(integ): custom-resource-getatt-data failure-seeking integration test - #854

Merged
go-to-k merged 1 commit into
mainfrom
test/custom-resource-getatt-data
Jun 14, 2026
Merged

test(integ): custom-resource-getatt-data failure-seeking integration test#854
go-to-k merged 1 commit into
mainfrom
test/custom-resource-getatt-data

Conversation

@go-to-k

@go-to-k go-to-k commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Summary

Test-only, failure-seeking integration fixture that exercises Fn::GetAtt of
a Custom Resource's Data keys resolving through to dependent resources during
a cdkd deploy. No src/** changes.

cdkd resolves CloudFormation intrinsic functions itself (no CloudFormation in
the loop), so the path where a Custom Resource returns Data attributes and a
downstream resource consumes them via Fn::GetAtt(<CR>, 'Data.<key>') is a
distinct resolver case that deserves dedicated real-AWS regression coverage.

What the fixture proves

  • A Custom Resource (AWS::CloudFormation::CustomResource backed by a Lambda)
    returns one or more Data keys from its provider.
  • A downstream resource references those keys via Fn::GetAtt of the CR's
    Data.<key> attribute.
  • cdkd's intrinsic-function resolver materializes the CR Data keys at deploy
    time and propagates the resolved values to the dependent resource.
  • A wrong or unresolved CR Data value would fail the dependent's create /
    the post-deploy assertion, so the fixture is genuinely failure-seeking rather
    than a happy-path smoke test.

verify.sh is BSD/macOS-portable (real exit-code capture plus an explicit
[verify] PASS summary line) and the fixture deploys with no VPC to keep the
run cheap.

Validation

Validated green against real AWS: deploy + destroy completed cleanly with no
orphan resources. Regenerated integ-coverage and scenario-coverage matrices
(0 orphans) and added a changelog entry.

Scope

  • tests/integration/custom-resource-getatt-data/** (new fixture)
  • docs/changelog-cdkd.md, docs/_generated/*, docs/*coverage*.md
    (regenerated matrices + changelog)
  • scripts/build-scenario-coverage-matrix.ts (matrix regeneration)

Do not merge yet.

Add a failure-seeking integration test fixture that exercises Custom
Resource Data-key GetAtt resolution: a CDK Custom Resource returns Data
keys that downstream resources reference via Fn::GetAtt, validating that
cdkd resolves CR Data-key attributes correctly during deploy and tears
the stack down cleanly on destroy.
@go-to-k
go-to-k force-pushed the test/custom-resource-getatt-data branch from afa0f37 to 95edc0d Compare June 14, 2026 02:08
@go-to-k

go-to-k commented Jun 14, 2026

Copy link
Copy Markdown
Owner Author

Independent code review (pr-code-reviewer): clean, test-only, no src. verify.sh proves CR Data-key GetAtt resolved into all 3 SSM dependents on real AWS (exact value match) + state.outputs cross-check; portable, 0-orphan. 1 cosmetic README count typo accepted. pr-review override (test-only, validated PASS) bound to 95edc0d.

@go-to-k
go-to-k merged commit b358a49 into main Jun 14, 2026
5 checks passed
@go-to-k
go-to-k deleted the test/custom-resource-getatt-data branch June 14, 2026 02:11
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 0.221.10 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

1 participant