Skip to content

(core): support CloudFormation Metadata Context in synthesized templates #39606

Closed as duplicate

Description

@satyakigh

Describe the feature

Add typed AWS CDK APIs for writing the advisory CloudFormation com.aws.cloudformation.Context block at resource and template level. The API should preserve rationale, invariants, change-safety guidance, provenance, dependencies, architecture references, and ownership in synthesized templates.

Use Case

CDK source often contains design intent that is absent from the synthesized and deployed CloudFormation template. Engineers and automated tools inspecting a stack later need that context to evaluate infrastructure changes safely.

Proposed Solution

Implement the API approved in RFC 994 through PR #38381:

  • CfnResourceMetadataContext applies complete Context values to selected CfnResource constructs during synthesis.
  • CfnTemplateMetadataContext writes template-level Context.
  • Public structs and enums mirror the published CloudFormation Metadata Context schema.
  • Existing applications remain unchanged unless they call the new APIs.

Other Information

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

AWS CDK Library version

N/A (framework feature request)

AWS CDK CLI version

N/A (framework feature request)

Environment details

N/A (framework feature request)

Activity

  1. github-actions commented on Nov 2, 2026

    @github-actions
    Contributor

    Comments on closed issues and PRs are hard for our team to see.
    If you need help, please open a new issue that references this one.

  2. locked as resolved and limited conversation to collaborators on Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/coreRelated to core CDK functionalityneeds-triageThis issue or PR still needs to be triaged.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions