(CustomResources): Error: Resolution error: Resolution error: Trying to resolve() a Construct at /Resources/${Token[
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the bug
When attempting to synthesize a custom resource that creates resources in Salesforce, I get the following error
### Expected Behavior
I was expecting to see SalesforceObject and SalesforceObjectFields as properties of "Custom::SalesforceMetadata" in the synthesized template
```json
"salesforcemetadataSalesforceMetadataResourceFCFF42F2": {
"Type": "Custom::SalesforceMetadata",
"Properties": {
"ServiceToken": {
"Fn::GetAtt": [
"salesforcemetadataSalesforceProviderframeworkonEventD0B8B143",
"Arn"
]
}
// SalesforceObject
// SalesforceObject.SalesforceObjectField
},
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete",
"Metadata": {
"aws:cdk:path": "cdk-salesforce-iac-poc-stack/salesforce-metadata/SalesforceMetadataResource/Default"
}
},
```
### Current Behavior
`cdk synth` doesn't finish and throws the folllowing error
### Reproduction Steps
Run `cdk synth` in this repo
https://github.com/AllanOricil/cdk-salesforce-iac-poc
### Possible Solution
_No response_
### Additional Information/Context
_No response_
### CDK CLI Version
2.141.0
### Framework Version
_No response_
### Node.js Version
18.19.1
### OS
macos latest
### Language
TypeScript
### Language Version
5.4.5
### Other information
My goal with this custom construct it to be able to use a single tool to develop solutions that require both Salesforce and AWS resources. This simplest repository I shared is attempting to create a very simple Database Table in Salesforce (they call it SObject, but let's try to use terms which both of us understand even if it is wrong). I want to join all salesforce resources under one called "SalesforceMetadata" so that it represents all metadata that belongs to a single Salesforce Organization. Moreover, I did not create custom resources for SalesforceObject and SalesforceObjectField constructs because I wan't them to be deployed by Custom::SalesforceMetadata. In other words, they can't be deployed alone.
I want to build something like Mongodb Atlas did
https://github.com/mongodb/awscdk-resources-mongodbatlas
Contributor guide
Research direction
Clone the linked cdk-salesforce-iac-poc repository and first run `cdk synth` with the reported CDK CLI and Node.js versions. Inspect how SalesforceMetadata, SalesforceObject, and SalesforceObjectField are defined and compare the failure with the expected synthesized Custom::SalesforceMetadata properties. Done means synthesis completes and the expected Salesforce properties appear in the template.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100