aws-cloudformation / cloudformation-cli

The CloudFormation Provider Development Toolkit allows you to author your own resource providers and modules that can be used by CloudFormation.
Apache License 2.0
318 stars 161 forks source link

Adding regex based exports replacement #1049

Closed ammokhov closed 9 months ago

ammokhov commented 9 months ago

Issue #, if available:

Description of changes:

Adding a regex based exports replacement, as it is a less expensive manipulation. The change finds {{ variable }} pattern that jinja supports but verifies that variable is compliant with stack export naming convention.

Example:

overrides.json

{
    "CREATE": {
        "/SubnetId": "{{ subnetID }}"
    }
}

rendered overrides.json

{
    "CREATE": {
        "/SubnetId": "subnet-0bc6136e"
    }
}

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.