Skip to content

Commit 68744f1

Browse files
Merge pull request #1120 from dbsystel/fix/default-binary
fix: default behaviour for format binary as in 1.x
2 parents 46d7a0b + 1d5b35a commit 68744f1

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

API.md

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/SopsSecret.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export enum RawOutput {
4040
export interface SopsSecretProps extends SopsSyncOptions {
4141
/**
4242
* Should the secret parsed and transformed to json?
43-
* @default - undefined - no raw output
43+
* @default - undefined - STRING for binary secrets, else no raw output
4444
*/
4545
readonly rawOutput?: RawOutput;
4646
/**
@@ -104,7 +104,10 @@ export class SopsSecret extends Construct implements ISecret {
104104
region: this.stack.region,
105105
};
106106

107-
let resourceType = ResourceType.SECRET;
107+
let resourceType =
108+
props.sopsFileFormat == 'binary'
109+
? ResourceType.SECRET_RAW
110+
: ResourceType.SECRET;
108111
if (props.rawOutput === RawOutput.BINARY) {
109112
resourceType = ResourceType.SECRET_BINARY;
110113
}

0 commit comments

Comments
 (0)