-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
@aws-cdk/aws-cloudfrontRelated to Amazon CloudFrontRelated to Amazon CloudFronteffort/mediumMedium work item – several days of effortMedium work item – several days of effortfeature-requestA feature should be added or improved.A feature should be added or improved.p2
Description
Describe the feature
It would be nice to do something like this:
const store = new cloudfront.KeyValueStore(this, 'KeyValueStore', {
keyValueStoreName: 'KeyValueStore',
source: cloudfront.ImportSource.fromInline({
"data":[
{
"key": "key1",
"value": "value"
},
{
"key": "key2",
"value": "value"
}
]
}),
});Use Case
I'd like to store a hashing key, which don't want to be versioned in git.
It is saved in Systems Manager Parameter Store, and I retrieve it before initializing the stacks, so it is a parameter to the stack which should create the KeyValueStore.
I know I could create a temp JSON file, but this has already been made for Lambda's code, so it could be in here too.
https://github.com/aws/aws-cdk/blob/v2.129.0/packages/aws-cdk-lib/aws-lambda/lib/code.ts#L36
https://github.com/aws/aws-cdk/blob/v2.129.0/packages/aws-cdk-lib/aws-lambda/lib/code.ts#L243
Proposed Solution
Add an InlineImportSource class aswell as an static method ImportSource.fromInline(), as it is done with Lambda code.
Other Information
No response
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
CDK version used
1.129.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-cloudfrontRelated to Amazon CloudFrontRelated to Amazon CloudFronteffort/mediumMedium work item – several days of effortMedium work item – several days of effortfeature-requestA feature should be added or improved.A feature should be added or improved.p2