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
316 stars 157 forks source link

`cloudformation-cli` uses pyjq for `propertyTransform` while AWS backend uses JSONata syntax #1072

Open skarimo opened 1 month ago

skarimo commented 1 month ago

The cloudformaiton-cli uses pyjq syntax for transforming models See: [here](https://github.com/aws-cloudformation/cloudformation-cli/blob/master/src/rpdk/core/contract/resource_client.py#L258

However, the backend uses JSONata. See here

Unfortunately this means we cannot use contract tests to test the behavior of our resources. In addition, any developer mistake in setting state will fail in non-obvious ways when using propertyTransform