@aws-cdk/aws-codepipeline-actions: Parameter not usable in actionName
See original GitHub issueCloudformation parameters are not usable in action names.
Reproduction Steps
const projectNameToken = new CfnParameter(this, 'projectName', {
type: 'String',
});
const sourceAction = new CodeCommitSourceAction({
actionName: `${projectNameToken.valueAsString}-pipeline-source`,
repository: repo,
output: artifact
});
What did you expect to happen?
The parameter is used for the creation of the actionName.
What actually happened?
Unrecognized token key error:
/home/xxxx/cdk/cdk-pipeline/node_modules/@aws-cdk/core/lib/private/token-map.ts:165
throw new Error(`Unrecognized token key: ${key}`);
^
Error: Resolution error: Resolution error: Resolution error: Resolution error: Unrecognized token key: TOKEN189.
Object creation stack:
at Execute again with CDK_DEBUG=true to capture stack traces.
Object creation stack:
at Execute again with CDK_DEBUG=true to capture stack traces..
at TokenMap.lookupToken (/home/xxxx/cdk/cdk-pipeline/node_modules/@aws-cdk/core/lib/private/token-map.ts:165:13)
at TokenString.split (/home/xxxx/cdk/cdk-pipeline/node_modules/@aws-cdk/core/lib/private/encoding.ts:55:20)
at resolve (/home/xxxx/cdk/cdk-pipeline/node_modules/@aws-cdk/core/lib/private/resolve.ts:169:29)
at Object.resolve (/home/xxxx/cdk/cdk-pipeline/node_modules/@aws-cdk/core/lib/private/resolve.ts:119:77)
at resolve (/home/xxxx/cdk/cdk-pipeline/node_modules/@aws-cdk/core/lib/private/resolve.ts:230:47)
at Object.resolve (/home/xxxx/cdk/cdk-pipeline/node_modules/@aws-cdk/core/lib/private/resolve.ts:119:77)
at /home/xxxx/cdk/cdk-pipeline/node_modules/@aws-cdk/core/lib/private/resolve.ts:200:45
at Array.map (<anonymous>)
at resolve (/home/xxxx/cdk/cdk-pipeline/node_modules/@aws-cdk/core/lib/private/resolve.ts:200:8)
at Object.resolve (/home/xxxx/cdk/cdk-pipeline/node_modules/@aws-cdk/core/lib/private/resolve.ts:119:77)
Environment
- CDK CLI Version : 1.123.0 (build fad855e)
- Framework Version:
- Node.js Version: v14.17.6
- OS : Ubuntu 20.04 (WSL2)
- Language (Version): TypeScript (4.4.3)
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
ASP.Net WebAPI ActionName Route Not Found - Stack Overflow
I was able to solve this by adding the Route property with HttpGet and renaming all of my functions to unique names like...
Read more >Routing and Action Selection in ASP.NET Web API
The route dictionary does not contain an entry for "action", so we don't need to match the action name. Next, we try to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, maybe the documentation is the fastest solution. I will look into it next week.
This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.