Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(cloudfront): Support inline data as KeyValueStore import source #29204

Closed
2 tasks
Labels
@aws-cdk/aws-cloudfront Related to Amazon CloudFront effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2

Comments

@aprat84
Copy link

aprat84 commented Feb 21, 2024

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

@aprat84 aprat84 added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Feb 21, 2024
@github-actions github-actions bot added the @aws-cdk/aws-cloudfront Related to Amazon CloudFront label Feb 21, 2024
@aprat84 aprat84 changed the title (cloudfront): Support inline JSON as KeyValueStore import source (cloudfront): Support inline data as KeyValueStore import source Feb 21, 2024
@pahud
Copy link
Contributor

pahud commented Feb 21, 2024

This would be awesome! We welcome the pull requests!

@pahud pahud added p2 effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. and removed feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Feb 21, 2024
@mergify mergify bot closed this as completed in #29419 Apr 8, 2024
@mergify mergify bot closed this as completed in 5675010 Apr 8, 2024
Copy link

github-actions bot commented Apr 8, 2024

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

1 similar comment
Copy link

github-actions bot commented Apr 8, 2024

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment