aws-cloudformation / aws-cloudformation/cloudformation-cli
The logicalResourceIdentifier property in create/update/delete actions in contract tests has an inconsistent value
- Dominant language
- Python
- Stars
- 336
- Forks
- 172
- Avg merge
- 3d 5m
- Merged PRs (30d)
- 3
Description
Hello,
cfn 0.2.32
During contract tests, the value for the logicalResourceIdentifier property is inconsistent between crate/update/delete actions for each test. The value is also not an alphanumeric value, which is expected based on the documentation. The value appears to be a uuid. Resource types that process the value experience undefined behavior during contract tests, but function properly after submission.
Example extracted from rpdk.log (not request although values are consistent)
CREATE
`{
"callbackContext": null,
"action": "CREATE",
"requestData": {
"resourceProperties": {
"PropOne": "ValueOne",
"PropTwo": "ValueTwo"
},
"previousResourceProperties": null,
"logicalResourceId": "48d73540-cc12-4908-9b49-eb3f81659ef6"
},
"region": "us-west-1",
"awsAccountId": "123456789012",
"bearerToken": "48d73540-cc12-4908-9b49-eb3f81659ef6"
}`
DELETE
`{
"callbackContext": null,
"action": "DELETE",
"requestData": {
"resourceProperties": {
"PropOne": "ValueOne",
"PropTwo": "ValueTwo"
},
"previousResourceProperties": null,
"logicalResourceId": "224ccfe1-db5a-4bca-a956-46207d44b1d8"
},
"region": "us-west-1",
"awsAccountId": "123456789012",
"bearerToken": "224ccfe1-db5a-4bca-a956-46207d44b1d8"
}`
The value also doesn't meet the constraints:
Logical ID
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template.
An invocation with a callback context for each action (create/update/delete) does have a consistent value.
Contributor guide
Assessment
This issue has not been assessed yet.