sops-secretsmanager-cdk
Advanced tools
Comparing version 1.2.2 to 1.3.0
@@ -0,3 +1,3 @@ | ||
import * as kms from '@aws-cdk/aws-kms'; | ||
import * as s3Assets from '@aws-cdk/aws-s3-assets'; | ||
import * as kms from '@aws-cdk/aws-kms'; | ||
import * as secretsManager from '@aws-cdk/aws-secretsmanager'; | ||
@@ -19,3 +19,3 @@ import * as cdk from '@aws-cdk/core'; | ||
readonly path?: string; | ||
readonly kmsKey: kms.IKey; | ||
readonly kmsKey?: kms.IKey; | ||
readonly mappings: SopsSecretsManagerMappings; | ||
@@ -22,0 +22,0 @@ readonly fileType?: SopsSecretsManagerFileType; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const path = require("path"); | ||
const cfn = require("@aws-cdk/aws-cloudformation"); | ||
const s3Assets = require("@aws-cdk/aws-s3-assets"); | ||
const iam = require("@aws-cdk/aws-iam"); | ||
const lambda = require("@aws-cdk/aws-lambda"); | ||
const s3Assets = require("@aws-cdk/aws-s3-assets"); | ||
const secretsManager = require("@aws-cdk/aws-secretsmanager"); | ||
const cdk = require("@aws-cdk/core"); | ||
const customResource = require("@aws-cdk/custom-resources"); | ||
const path = require("path"); | ||
class SopsSecretsManagerProvider extends cdk.Construct { | ||
@@ -46,2 +46,3 @@ constructor(scope, id) { | ||
constructor(scope, id, props) { | ||
var _a; | ||
super(scope, id); | ||
@@ -58,3 +59,3 @@ this.secret = this.getSecret(props.secret, props.secretName); | ||
SourceHash: this.asset.sourceHash, | ||
KMSKeyArn: props.kmsKey.keyArn, | ||
KMSKeyArn: (_a = props.kmsKey) === null || _a === void 0 ? void 0 : _a.keyArn, | ||
Mappings: JSON.stringify(props.mappings), | ||
@@ -95,2 +96,2 @@ FileType: props.fileType, | ||
exports.SopsSecretsManager = SopsSecretsManager; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6W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iAnbWFpbi5vbl9ldmVudCcsXG4gICAgICAgICAgICAgICAgdGltZW91dDogY2RrLkR1cmF0aW9uLm1pbnV0ZXMoNSksXG4gICAgICAgICAgICAgICAgaW5pdGlhbFBvbGljeTogW1xuICAgICAgICAgICAgICAgICAgICBuZXcgaWFtLlBvbGljeVN0YXRlbWVudCh7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXNvdXJjZXM6IFsnKiddLFxuICAgICAgICAgICAgICAgICAgICAgICAgYWN0aW9uczogWydzMzpHZXRPYmplY3QqJywgJ3MzOkdldEJ1Y2tldConLCAnczM6TGlzdConLCAnczM6RGVsZXRlT2JqZWN0KicsICdzMzpQdXRPYmplY3QqJywgJ3MzOkFib3J0KiddLFxuICAgICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgICAgbmV3IGlhbS5Qb2xpY3lTdGF0ZW1lbnQoe1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVzb3VyY2VzOiBbJyonXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGFjdGlvbnM6IFsna21zOionXSxcbiAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgIG5ldyBpYW0uUG9saWN5U3RhdGVtZW50KHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc291cmNlczogWycqJ10sXG4gICAgICAgICAgICAgICAgICAgICAgICBhY3Rpb25zOiBbJ3NlY3JldHNtYW5hZ2VyOionXSxcbiAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgIH0pLFxuICAgICAgICB9KTtcbiAgICB9XG59XG5cbmV4cG9ydCBjbGFzcyBTb3BzU2VjcmV0c01hbmFnZXIgZXh0ZW5kcyBjZGsuQ29uc3RydWN0IHtcbiAgICBwdWJsaWMgcmVhZG9ubHkgc2VjcmV0OiBzZWNyZXRzTWFuYWdlci5JU2VjcmV0O1xuICAgIHB1YmxpYyByZWFkb25seSBhc3NldDogczNB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UsXG4gICAgICAgICAgICB9LFxuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICBwdWJsaWMgZ2V0U2VjcmV0KHNlY3JldD86IHNlY3JldHNNYW5hZ2VyLklTZWNyZXQsIHNlY3JldE5hbWU/OiBzdHJpbmcpOiBzZWNyZXRzTWFuYWdlci5JU2VjcmV0IHtcbiAgICAgICAgaWYgKHNlY3JldCAmJiBzZWNyZXROYW1lKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0Nhbm5vdCBzZXQgYm90aCBzZWNyZXQgYW5kIHNlY3JldE5hbWUnKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChzZWNyZXQpIHtcbiAgICAgICAgICAgIHJldHVybiBzZWNyZXQ7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoc2VjcmV0TmFtZSkge1xuICAgICAgICAgICAgcmV0dXJuIG5ldyBzZWNyZXRzTWFuYWdlci5TZWNyZXQodGhpcywgJ1NlY3JldCcsIHtcbiAgICAgICAgICAgICAgICBzZWNyZXROYW1lLFxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cblxuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ011c3Qgc2V0IG9uZSBvZiBzZWNyZXQgb3Igc2VjcmV0TmFtZScpO1xuICAgIH1cblxuICAgIHB1YmxpYyBnZXRBc3NldChhc3NldD86IHMzQXNzZXRzLkFzc2V0LCBzZWNyZXRGaWxlUGF0aD86IHN0cmluZykge1xuICAgICAgICBpZiAoYXNzZXQgJiYgc2VjcmV0RmlsZVBhdGgpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignQ2Fubm90IHNldCBib3RoIGFzc2V0IGFuZCBwYXRoJyk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoYXNzZXQpIHtcbiAgICAgICAgICAgIHJldHVybiBhc3NldDtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChzZWNyZXRGaWxlUGF0aCkge1xuICAgICAgICAgICAg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Mtc2VjcmV0cy1tYW5hZ2VyLXByb3ZpZGVyJywge1xuICAgICAgICAgICAgb25FdmVudEhhbmRsZXI6IG5ldyBsYW1iZGEuRnVuY3Rpb24odGhpcywgJ3NvcHMtc2VjcmV0cy1tYW5hZ2VyLWV2ZW50Jywge1xuICAgICAgICAgICAgICAgIGNvZGU6IGxhbWJkYS5Db2RlLmZyb21Bc3NldChwYXRoLmpvaW4oX19kaXJuYW1lLCAncHJvdmlkZXInKSksXG4gICAgICAgICAgICAgICAgcnVudGltZTogbGFtYmRhLlJ1bnRpbWUuUFlUSE9OXzNfOCxcbiAgICAgICAgICAgICAgICBoYW5kbGVyOiAnbWFpbi5vbl9ldmVudCcsXG4gICAgICAgICAgICAgICAgdGltZW91dDogY2RrLkR1cmF0aW9uLm1pbnV0ZXMoNSksXG4gICAgICAgICAgICAgICAgaW5pdGlhbFBvbGljeTogW1xuICAgICAgICAgICAgICAgICAgICBuZXcgaWFtLlBvbGljeVN0YXRlbWVudCh7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXNvdXJjZXM6IFsnKiddLFxuICAgICAgICAgICAgICAgICAgICAgICAgYWN0aW9uczogWydzMzpHZXRPYmplY3QqJywgJ3MzOkdldEJ1Y2tldConLCAnczM6TGlzdConLCAnczM6RGVsZXRlT2JqZWN0KicsICdzMzpQdXRPYmplY3QqJywgJ3MzOkFib3J0KiddLFxuICAgICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgICAgbmV3IGlhbS5Qb2xpY3lTdGF0ZW1lbnQoe1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVzb3VyY2VzOiBbJyonXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGFjdGlvbnM6IFsna21zOionXSxcbiAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgIG5ldyBpYW0uUG9saWN5U3RhdGVtZW50KHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc291cmNlczogWycqJ10sXG4gIC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2tldDogdGhpcy5hc3NldC5zM0J1Y2tldE5hbWUsXG4gICAgICAgICAgICAgICAgUzNQYXRoOiB0aGlzLmFzc2V0LnMzT2JqZWN0S2V5LFxuICAgICAgICAgICAgICAgIFNvdXJjZUhhc2g6IHRoaXMuYXNzZXQuc291cmNlSGFzaCxcbiAgICAgICAgICAgICAgICBLTVNLZXlBcm46IHByb3BzLmttc0tleT8ua2V5QXJuLFxuICAgICAgICAgICAgICAgIE1hcHBpbmdzOiBKU09OLnN0cmluZ2lmeShwcm9wcy5tYXBwaW5ncyksXG4gICAgICAgICAgICAgICAgRmlsZVR5cGU6IHByb3BzLmZpbGVUeXBlLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgcHVibGljIGdldFNlY3JldChzZWNyZXQ/OiBzZWNyZXRzTWFuYWdlci5JU2VjcmV0LCBzZWNyZXROYW1lPzogc3RyaW5nKTogc2VjcmV0c01hbmFnZXIuSVNlY3JldCB7XG4gICAgICAgIGlmIChzZWNyZXQgJiYgc2VjcmV0TmFtZSkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdDYW5ub3Qgc2V0IGJvdGggc2VjcmV0IGFuZCBzZWNyZXROYW1lJyk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoc2VjcmV0KSB7XG4gICAgICAgICAgICByZXR1cm4gc2VjcmV0O1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHNlY3JldE5hbWUpIHtcbiAgICAgICAgICAgIHJldHVybiBuZXcgc2VjcmV0c01hbmFnZXIuU2VjcmV0KHRoaXMsICdTZWNyZXQnLCB7XG4gICAgICAgICAgICAgICAgc2VjcmV0TmFtZSxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdNdXN0IHNldCBvbmUgb2Ygc2VjcmV0IG9yIHNlY3JldE5hbWUnKTtcbiAgICB9XG5cbiAgICBwdWJsaWMgZ2V0QXNzZXQoYXNzZXQ/OiBzM0Fzc2V0cy5Bc3NldCwgc2VjcmV0RmlsZVBhdGg/OiBzdHJpbmcpIHtcbiAgICAgICAgaWYgKGFzc2V0ICYmIHNlY3JldEZpbGVQYXRoKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0Nhbm5vdCBzZXQgYm90aCBhc3NldCBhbmQgcGF0aCcpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGFzc2V0KSB7XG4gICAgICAgICAgICByZXR1cm4gYXNzZXQ7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoc2VjcmV0RmlsZVBhdGgpIHtcbiAgICAgICAgICAgIHJldHVybiBuZXcgczNBc3NldHMuQXNzZXQodGhpcywgJ1NvcHNBc3NldCcsIHtcbiAgICAgICAgICAgICAgICBwYXRoOiBzZWNyZXRGaWxlUGF0aCxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdNdXN0IHNldCBvbmUgb2YgYXNzZXQgb3IgcGF0aCcpO1xuICAgIH1cbn1cbiJdfQ== |
{ | ||
"name": "sops-secretsmanager-cdk", | ||
"version": "1.2.2", | ||
"version": "1.3.0", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "get-sops": "wget https://github.com/mozilla/sops/releases/download/v3.5.0/sops-v3.5.0.linux -O ./provider/sops && chmod a+x ./provider/sops", |
@@ -32,1 +32,9 @@ # sops-secretsmanager-cdk | ||
and puts them into the SecretsManager secret. | ||
## Releasing a new version | ||
- (Almost certainly) be on latest master, with no unpublished changes | ||
- Run `npm version (patch|minor|major)` as appropriate | ||
- Run `git push` and `git push origin TAG` where `TAG` is the tag that `npm version` just created | ||
The tag triggers a CircleCI job to publish to npm. |
Sorry, the diff of this file is not supported yet
29356470
211
40