UNPKG

databricks-cdk

Version:

With this package databricks resources can be deployed with cdk

32 lines (31 loc) 1.05 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SecretScope = void 0; const aws_cdk_lib_1 = require("aws-cdk-lib"); const secret_1 = require("./secret"); class SecretScope extends aws_cdk_lib_1.CustomResource { constructor(scope, id, props) { super(scope, id, { serviceToken: props.serviceToken, properties: { action: "secret-scope", workspace_url: props.workspaceUrl, scope: props.scope, initial_manage_principal: props.initialManagePrincipal, } }); this.props = props; } createSecret(scope, id, key, stringValue) { const s = new secret_1.Secret(scope, id, { workspaceUrl: this.props.workspaceUrl, scope: this.props.scope, key: key, stringValue: stringValue, serviceToken: this.props.serviceToken }); s.node.addDependency(this); return s; } } exports.SecretScope = SecretScope;