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

feat: sdkv2 #1111

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .projen/deps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .projen/tasks.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions .projenrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const { awscdk } = require('projen');
const project = new awscdk.AwsCdkConstructLibrary({
author: 'Markus Siebert',
authorAddress: 'markus.siebert@deutschebahn.com',
cdkVersion: '2.144.0',
cdkVersion: '2.177.0',
stability: 'stable',
homepage: 'https://constructs.dev/packages/cdk-sops-secrets',
description:
Expand Down Expand Up @@ -32,7 +32,9 @@ const project = new awscdk.AwsCdkConstructLibrary({
bundledDeps: ['yaml'],
// deps: [], /* Runtime dependencies of this module. */,
// description: undefined, /* The description is just a string that helps people understand the purpose of the package. */
// devDeps: [], /* Build dependencies for this module. */
devDeps: [
'json-schema-to-typescript',
], /* Build dependencies for this module. */
integrationTestAutoDiscover: true,
prettier: true,
prettierOptions: {
Expand Down
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"json.schemas": [
{
"fileMatch": [
"lambda/internal/event/testdata/*.json",
"lambda/events/*.json"
],
"url": "./lambda/internal/event/config-schema.json"
}
]
}
16 changes: 16 additions & 0 deletions lambda/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Tested combinations

| Test Case | Input Format | Output Format | Flatten | Stringify | Handling Type | Expected Behavior |
| --------- | ------------ | ------------- | ---------- | --------- | --------------- | -------------------------------------------- |
| 01 | binary | binary | N/A | N/A | SECRET | No transformation, raw binary output |
| 02 | binary | binary | N/A | N/A | PARAMETER | No transformation, raw binary output |
| 11 | json | N/A | true (N/A) | true | PARAMETER_MULTI | Outputformat is ignored (allways string map) |
| 12 | yaml | N/A | true (N/A) | true | PARAMETER_MULTI | Outputformat is ignored (allways string map) |
| 13 | dotenv | N/A | true (N/A) | true | PARAMETER_MULTI | Outputformat is ignored (allways string map) |
| 21 | json | json | true (N/A) | true | SECRET | Flattens JSON but retains JSON format |
| 22 | json | binary | N/A | N/A | SECRET | Flattens JSON but retains JSON format |
| 23 | yaml | json | true | true | SECRET | Flattens JSON, converts to YAML, stringifies |
| 24 | yaml | binary | N/A | N/A | SECRET | Flattens JSON, converts to YAML, stringifies |
| 25 | dotenv | json | true | true | SECRET | Flattens YAML, converts to JSON, stringifies |
| 26 | dotenv | binary | N/A | N/A | SECRET | SecretContent the same as |
| 27 | binary | binary | false | true | SECRET | Converts dotenv to YAML, stringifies values |

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions lambda/__snapshots__/02-secret-binary-binary-true-true.json.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

80 changes: 80 additions & 0 deletions lambda/__snapshots__/11-parametermulti-json-na-true-na.json.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

80 changes: 80 additions & 0 deletions lambda/__snapshots__/12-parametermulti-yaml-na-true-na.json.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions lambda/__snapshots__/13-parametermulti-dotenv-na-true-na.json.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions lambda/__snapshots__/21-secret-json-json-true-true.json.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions lambda/__snapshots__/22-secret-json-binary-na-na.json.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions lambda/__snapshots__/23-secret-yaml-json-true-true.json.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading