creationPolicy type does not support Tokens
See original GitHub issueTrying to convert the following to CDK-flavoured L2 constructs:
CreationPolicy:
ResourceSignal:
Timeout: !Ref InstanceCreationTimeout
Count: !Ref MinSize
However, the CDK types do not seem to support using anything other than a number. The following fails typescript compilation:
autoscaler.options.creationPolicy = {
resourceSignal: {
timeout: new cdk.Token(instanceCreationTimeout.ref),
count: new cdk.Token(minSize.ref)
}
};
The resourceSignal
type only accepts number
and undefined
for count
, meaning I can’t “cheat” and use a stringified nor a raw token.
Note that this is using CDK in its context as a “way to write cloudformation templates” rather than the entire app, so parameters / outputs / conditionals are being used.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Tokens: be able to represent as numbers · Issue #1455 - GitHub
We are able to represent tokens as strings (token.toString()) and as string arrays ... creationPolicy type does not support Tokens #1453.
Read more >CreationPolicy attribute - AWS CloudFormation
The creation policy is invoked only when CloudFormation creates the associated resource. Currently, the only CloudFormation resources that support creation ...
Read more >Manage personal access tokens using policies - Azure DevOps
In the Azure Active Directory tab, find the Restrict global personal access token creation policy and move the toggle to on.
Read more >Keycloak and Spring Boot: session creation policy
I try to configure keycloak with Spring Boot amd I would like to use custom Keycloak login page for getting acess token ......
Read more >Parent Child Token Hierarchy - Vault - Hashicorp Support
vault policy write example-token-create - << EOF // Example token creation policy path ... You do NOT need to run "vault login" again....
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
@mipearson See #1455 - that’s probably a better way to support this. The reason we are trying to avoid union types in the APIs is because they can hardly be translated well to other programming languages.
I want to point out here that what I was trying to do was based on a lack of understanding of how CDK works, as this issues is referenced as a use case from another.
These values are no longer references in my stack: they’re available at compile / synth time.