Comparing version 0.0.6-pre.121f0ee9fba2becf3ca31613cdf8b829e1ca8743 to 0.0.6-pre.215a3b1845f05fbe78888441527d037e3b1fce18
@@ -9,2 +9,3 @@ import { Construct } from 'constructs'; | ||
readonly outdir?: string; | ||
readonly stackTraces?: boolean; | ||
} | ||
@@ -11,0 +12,0 @@ /** |
@@ -5,2 +5,3 @@ "use strict"; | ||
const fs = require("fs"); | ||
const package_json_1 = require("../package.json"); | ||
/** | ||
@@ -18,2 +19,7 @@ * Represents a cdktf application. | ||
this.outdir = (_b = (_a = process.env.CDKTF_OUTDIR) !== null && _a !== void 0 ? _a : options.outdir) !== null && _b !== void 0 ? _b : 'cdktf.out'; | ||
const node = constructs_1.Node.of(this); | ||
if (options.stackTraces === false) { | ||
node.setContext(constructs_1.ConstructMetadata.DISABLE_STACK_TRACE_IN_METADATA, true); | ||
} | ||
node.setContext('cdktfVersion', package_json_1.version); | ||
} | ||
@@ -33,2 +39,2 @@ /** | ||
exports.App = App; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYXBwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsMkNBQTZDO0FBQzdDLHlCQUEwQjtBQVcxQjs7R0FFRztBQUNILE1BQWEsR0FBSSxTQUFRLHNCQUFTO0lBTTlCOzs7T0FHRztJQUNILFlBQVksVUFBc0IsRUFBRTs7UUFDaEMsS0FBSyxDQUFDLFNBQWdCLEVBQUUsRUFBRSxDQUFDLENBQUM7UUFDNUIsSUFBSSxDQUFDLE1BQU0sZUFBRyxPQUFPLENBQUMsR0FBRyxDQUFDLFlBQVksbUNBQUksT0FBTyxDQUFDLE1BQU0sbUNBQUksV0FBVyxDQUFDO0lBQzVFLENBQUM7SUFFRDs7T0FFRztJQUNJLEtBQUs7UUFDUixJQUFJLENBQUMsRUFBRSxDQUFDLFVBQVUsQ0FB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xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFN5bnRoZXNpemVzIGFsbCByZXNvdXJjZXMgdG8gdGhlIG91dHB1dCBkaXJlY3RvcnlcbiAgICAgKi9cbiAgICBwdWJsaWMgc3ludGgoKTogdm9pZCB7XG4gICAgICAgIGlmICghZnMuZXhpc3RzU3luYyh0aGlzLm91dGRpcikpIHtcbiAgICAgICAgICAgIGZzLm1rZGlyU3luYyh0aGlzLm91dGRpcik7XG4gICAgICAgIH1cblxuICAgICAgICBOb2RlLm9mKHRoaXMpLnN5bnRoZXNpemUoe1xuICAgICAgICAgICAgb3V0ZGlyOiB0aGlzLm91dGRpclxuICAgICAgICB9KTtcbiAgICB9XG59Il19 |
import { Construct, Node } from "constructs"; | ||
import { TerraformStack } from './terraform-stack'; | ||
export interface TerraformElementMetadata { | ||
readonly path: string; | ||
readonly uniqueId: string; | ||
readonly stackTrace: string[]; | ||
} | ||
export declare class TerraformElement extends Construct { | ||
@@ -8,2 +13,6 @@ readonly stack: TerraformStack; | ||
toTerraform(): any; | ||
get friendlyUniqueId(): string; | ||
protected get nodeMetadata(): { | ||
[key: string]: any; | ||
}; | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const constructs_1 = require("constructs"); | ||
const unique_1 = require("./private/unique"); | ||
const terraform_stack_1 = require("./terraform-stack"); | ||
@@ -8,2 +9,3 @@ class TerraformElement extends constructs_1.Construct { | ||
super(scope, id); | ||
this.node.addMetadata('stacktrace', 'trace'); | ||
this.stack = terraform_stack_1.TerraformStack.of(this); | ||
@@ -17,4 +19,19 @@ } | ||
} | ||
get friendlyUniqueId() { | ||
const node = this.node; | ||
const components = node.scopes.slice(1).map(c => constructs_1.Node.of(c).id); | ||
return components.length > 0 ? unique_1.makeUniqueId(components) : ''; | ||
} | ||
get nodeMetadata() { | ||
var _a; | ||
return { | ||
metadata: { | ||
path: this.node.path, | ||
uniqueId: this.friendlyUniqueId, | ||
stackTrace: (_a = this.node.metadata.find((e) => e.type === 'stacktrace')) === null || _a === void 0 ? void 0 : _a.trace | ||
} | ||
}; | ||
} | ||
} | ||
exports.TerraformElement = TerraformElement; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVycmFmb3JtLWVsZW1lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJ0ZXJyYWZvcm0tZWxlbWVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDJDQUE2QztBQUM3Qyx1REFBa0Q7QUFFbEQsTUFBYSxnQkFBaUIsU0FBUSxzQkFBUztJQUc3QyxZQUFZLEtBQWdCLEVBQUUsRUFBVTtRQUN0QyxLQUFLLENBQUMsS0FBSyxFQUFFLEVBQUUsQ0FBQyxDQUFDO1FBQ2pCLElBQUksQ0FBQyxLQUFLLEdBQUcsZ0NBQWMsQ0FBQyxFQUFFLENBQUMsSUFBSSxDQUFDLENBQUM7SUFDdkMsQ0FBQztJQUVELElBQVcsSUFBSTtRQUNiLE9BQU8saUJBQUksQ0FBQyxFQUFFLENBQUMsSUFBSSxDQUFDLENBQUE7SUFDdEIsQ0FBQztJQUVNLFdBQVc7UUFDaEIsT0FBTyxFQUFHLENBQUM7SUFDYixDQUFDO0NBQ0Y7QUFmRCw0Q0FlQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IENvbnN0cnVjdCwgTm9kZSB9IGZyb20gXCJjb25zdHJ1Y3RzXCI7XG5pbXBvcnQgeyBUZXJyYWZvcm1TdGFjayB9IGZyb20gJy4vdGVycmFmb3JtLXN0YWNrJ1xuXG5leHBvcnQgY2xhc3MgVGVycmFmb3JtRWxlbWVudCBleHRlbmRzIENvbnN0cnVjdCB7XG4gIHB1YmxpYyByZWFkb25seSBzdGFjazogVGVycmFmb3JtU3RhY2s7XG5cbiAgY29uc3RydWN0b3Ioc2NvcGU6IENvbnN0cnVjdCwgaWQ6IHN0cmluZykge1xuICAgIHN1cGVyKH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dGEuZmluZCgoZSkgPT4gZS50eXBlID09PSAnc3RhY2t0cmFjZScpPy50cmFjZVxuICAgICAgfSBhcyBUZXJyYWZvcm1FbGVtZW50TWV0YWRhdGFcbiAgICB9XG4gIH1cbn0iXX0= |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const constructs_1 = require("constructs"); | ||
const terraform_element_1 = require("./terraform-element"); | ||
@@ -16,12 +15,14 @@ class TerraformModule extends terraform_element_1.TerraformElement { | ||
interpolationForOutput(moduleOutput) { | ||
return `\${module.${constructs_1.Node.of(this).uniqueId}.${moduleOutput}}`; | ||
return `\${module.${this.friendlyUniqueId}.${moduleOutput}}`; | ||
} | ||
toTerraform() { | ||
const attributes = { | ||
...this.synthesizeAttributes(), | ||
source: this.source, | ||
version: this.version, | ||
"//": this.nodeMetadata | ||
}; | ||
return { | ||
module: { | ||
[constructs_1.Node.of(this).uniqueId]: { | ||
...this.synthesizeAttributes(), | ||
source: this.source, | ||
version: this.version, | ||
} | ||
[this.friendlyUniqueId]: attributes | ||
} | ||
@@ -32,2 +33,2 @@ }; | ||
exports.TerraformModule = TerraformModule; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVycmFmb3JtLW1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlcnJhZm9ybS1tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSwyQ0FBNkM7QUFDN0MsMkRBQXVEO0FBT3ZELE1BQXNCLGVBQWdCLFNBQVEsb0NBQWdCO0lBSzVELFlBQVksS0FBZ0IsRUFBRSxFQUFVLEVBQUUsT0FBK0I7UUFDdkUsS0FBSyxDQUFDLEtBQUssRUFBRSxFQUFFLENBQUMsQ0FBQztRQUVqQixJQUFJLENBQUMsTUFBTSxHQUFHLE9BQU8sQ0FBQyxNQUFNLENBQUM7UUFDN0IsSUFBSSxDQUFDLE9BQU8sR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NlOiB0aGlzLnNvdXJjZSxcbiAgICAgIHZlcnNpb246IHRoaXMudmVyc2lvbixcbiAgICAgIFwiLy9cIjogdGhpcy5ub2RlTWV0YWRhdGFcbiAgICB9XG5cbiAgICByZXR1cm4ge1xuICAgICAgbW9kdWxlOiB7XG4gICAgICAgIFt0aGlzLmZyaWVuZGx5VW5pcXVlSWRdOiBhdHRyaWJ1dGVzXG4gICAgICB9XG4gICAgfVxuICB9XG59Il19 |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const constructs_1 = require("constructs"); | ||
const terraform_element_1 = require("./terraform-element"); | ||
@@ -26,3 +25,3 @@ const util_1 = require("./util"); | ||
output: { | ||
[constructs_1.Node.of(this).uniqueId]: util_1.keysToSnakeCase(this.synthesizeAttributes()) | ||
[this.friendlyUniqueId]: util_1.keysToSnakeCase(this.synthesizeAttributes()) | ||
} | ||
@@ -33,2 +32,2 @@ }; | ||
exports.TerraformOutput = TerraformOutput; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVycmFmb3JtLW91dHB1dC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlcnJhZm9ybS1vdXRwdXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSwyQ0FBNkM7QUFDN0MsMkRBQXVEO0FBRXZELGlDQUF3QztBQVN4QyxNQUFhLGVBQWdCLFNBQVEsb0NBQWdCO0lBTW5ELFlBQVksS0FBZ0IsRUFBRSxFQUFVLEVBQUUsTUFBNkI7UUFDckUsS0FBSyxDQUFDLEtBQUssRUFBRSxFQUFFLENBQUMsQ0FBQztRQUVqQixJQUFJLENBQUMsS0FBSyxHQUFHLE1BQU0sQ0FBQyxLQUFLLENBQUM7UUFDMUIsSUFBSSxDQUFDLFdBQVcsR0FBRyxNQUFNLENBQUMsV0FBVyxDQUFDO1FBQ3RDLElBQUksQ0FBQyxTQUFTLEdBQUcsTUFB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gIH1cbiAgfVxuXG4gIHB1YmxpYyB0b1RlcnJhZm9ybSgpOiBhbnkge1xuICAgIHJldHVybiB7XG4gICAgICBvdXRwdXQ6IHtcbiAgICAgICAgW3RoaXMuZnJpZW5kbHlVbmlxdWVJZF06IGtleXNUb1NuYWtlQ2FzZSh0aGlzLnN5bnRoZXNpemVBdHRyaWJ1dGVzKCkpXG4gICAgICB9XG4gICAgfTtcbiAgfVxufSJdfQ== |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const constructs_1 = require("constructs"); | ||
const tokens_1 = require("./tokens"); | ||
@@ -51,3 +50,3 @@ const terraform_element_1 = require("./terraform-element"); | ||
get fqn() { | ||
return tokens_1.Token.asString(`${this.terraformResourceType}.${constructs_1.Node.of(this).uniqueId}`); | ||
return tokens_1.Token.asString(`${this.terraformResourceType}.${this.friendlyUniqueId}`); | ||
} | ||
@@ -71,6 +70,8 @@ get terraformMetaArguments() { | ||
toTerraform() { | ||
const attributes = util_1.deepMerge(util_1.keysToSnakeCase(this.synthesizeAttributes()), util_1.keysToSnakeCase(this.terraformMetaArguments), this.rawOverrides); | ||
attributes['//'] = this.nodeMetadata; | ||
return { | ||
resource: { | ||
[this.terraformResourceType]: { | ||
[constructs_1.Node.of(this).uniqueId]: util_1.deepMerge(util_1.keysToSnakeCase(this.synthesizeAttributes()), util_1.keysToSnakeCase(this.terraformMetaArguments), this.rawOverrides) | ||
[this.friendlyUniqueId]: attributes | ||
} | ||
@@ -81,6 +82,6 @@ } | ||
interpolationForAttribute(terraformAttribute) { | ||
return `\${${this.terraformResourceType}.${constructs_1.Node.of(this).uniqueId}.${terraformAttribute}}`; | ||
return `\${${this.terraformResourceType}.${this.friendlyUniqueId}.${terraformAttribute}}`; | ||
} | ||
} | ||
exports.TerraformResource = TerraformResource; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVycmFmb3JtLXJlc291cmNlLmpzIiwic291cmNlUm9vdCI6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JhZm9ybVJlc291cmNlVHlwZV06IHtcbiAgICAgICAgICBbTm9kZS5vZih0aGlzKS51bmlxdWVJZF06IGRlZXBNZXJnZShcbiAgICAgICAgICAgIGtleXNUb1NuYWtlQ2FzZSh0aGlzLnN5bnRoZXNpemVBdHRyaWJ1dGVzKCkpLFxuICAgICAgICAgICAga2V5c1RvU25ha2VDYXNlKHRoaXMudGVycmFmb3JtTWV0YUFyZ3VtZW50cyksXG4gICAgICAgICAgICB0aGlzLnJhd092ZXJyaWRlc1xuICAgICAgICAgIClcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH07XG4gIH1cblxuICBwcml2YXRlIGludGVycG9sYXRpb25Gb3JBdHRyaWJ1dGUodGVycmFmb3JtQXR0cmlidXRlOiBzdHJpbmcpIHtcbiAgICByZXR1cm4gYFxcJHske3RoaXMudGVycmFmb3JtUmVzb3VyY2VUeXBlfS4ke05vZGUub2YodGhpcykudW5pcXVlSWR9LiR7dGVycmFmb3JtQXR0cmlidXRlfX1gO1xuICB9XG59Il19 | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVycmFmb3JtLXJlc291cmNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsidGVycmFmb3JtLXJlc291cmNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQ0EscUNBQWdDO0FBQ2hDLDJEQUF1RDtBQUV2RCxpQ0FBb0Q7QUF5QnBELE1BQWEsaUJBQWtCLFNBQVEsb0NBQWdCO0lBWXJELFlBQVksS0FBZ0IsRUFBRSxFQUFVLEVBQUUsTUFBK0I7UUFDdkUsS0FBSyxDQUFDLEtBQUssRUFBRSxFQUFFLENBQUMsQ0FBQztRQVZGLGlCQUFZLEdBQVEsRUFBRSxDQUFBO1FBWXJDLElBQUksQ0FBQyxxQkFBcUIsR0FBRyxNQUFNLENBQUMscUJBQXFCLENBQUM7UUFDMUQsSUFBSSxDQUFDLDBCQUE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dGUgaW50ZXJwb2xhdGlvbkZvckF0dHJpYnV0ZSh0ZXJyYWZvcm1BdHRyaWJ1dGU6IHN0cmluZykge1xuICAgIHJldHVybiBgXFwkeyR7dGhpcy50ZXJyYWZvcm1SZXNvdXJjZVR5cGV9LiR7dGhpcy5mcmllbmRseVVuaXF1ZUlkfS4ke3RlcnJhZm9ybUF0dHJpYnV0ZX19YDtcbiAgfVxufSJdfQ== |
import { Construct, IConstruct, ISynthesisSession } from 'constructs'; | ||
import { TerraformProvider } from './terraform-provider'; | ||
export interface TerraformStackMetadata { | ||
readonly stackName: string; | ||
readonly version: string; | ||
} | ||
export declare class TerraformStack extends Construct { | ||
readonly artifactFile: string; | ||
private readonly rawOverrides; | ||
private readonly cdktfVersion; | ||
constructor(scope: Construct, id: string); | ||
@@ -7,0 +12,0 @@ static isStack(x: any): x is TerraformStack; |
@@ -16,2 +16,3 @@ "use strict"; | ||
this.artifactFile = `${constructs_1.Node.of(this).uniqueId}.tf.json`; | ||
this.cdktfVersion = constructs_1.Node.of(this).tryGetContext('cdktfVersion'); | ||
Object.defineProperty(this, STACK_SYMBOL, { value: true }); | ||
@@ -67,3 +68,10 @@ } | ||
toTerraform() { | ||
const tf = {}; | ||
const tf = { | ||
"//": { | ||
metadata: { | ||
version: this.cdktfVersion, | ||
stackName: this.artifactFile.replace('.tf.json', ''), | ||
} | ||
} | ||
}; | ||
const visit = (node) => { | ||
@@ -95,2 +103,2 @@ if (node instanceof terraform_element_1.TerraformElement) { | ||
exports.TerraformStack = TerraformStack; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVycmFmb3JtLXN0YWNrLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsidGVycmFmb3JtLXN0YWNrLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsMkNBQTRFO0FBQzVFLHVDQUFtQztBQUNuQyx5QkFBeUI7QUFDekIsNkJBQTZCO0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5rU3luYyh0YXJnZXQsIGxpbmspO1xuICB9XG59XG4iXX0= |
@@ -12,2 +12,3 @@ import { App } from '../lib'; | ||
static app(): App; | ||
static stubVersion(app: App): App; | ||
/** | ||
@@ -14,0 +15,0 @@ * Returns the Terraform synthesized JSON. |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const constructs_1 = require("constructs"); | ||
const fs = require("fs"); | ||
@@ -17,4 +18,9 @@ const path = require("path"); | ||
const outdir = fs.mkdtempSync(path.join(os.tmpdir(), 'cdktf.outdir.')); | ||
return new lib_1.App({ outdir }); | ||
const app = new lib_1.App({ outdir, stackTraces: false }); | ||
return this.stubVersion(app); | ||
} | ||
static stubVersion(app) { | ||
constructs_1.Node.of(app).setContext('cdktfVersion', 'stubbed'); | ||
return app; | ||
} | ||
/** | ||
@@ -32,2 +38,2 @@ * Returns the Terraform synthesized JSON. | ||
exports.Testing = Testing; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdGluZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3RpbmcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFDQSx5QkFBMEI7QUFDMUIsNkJBQThCO0FBQzlCLHlCQUEwQjtBQUMxQixnQ0FBNkI7QUFHN0I7O0dBRUc7QUFDSCxNQUFhLE9BQU87SUFDaEI7OztPQUdHO0lBQ0ksTUFBTSxDQUFDLEdBQUc7UUFDYixNQUFNLE1BQU0sR0FBRyxFQUFFLENBQUMsV0FBVyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsRUFBRSxDQUFDLE1BQU0sRUFBRSxFQUFFLGVBQWUsQ0FBQyxDQUFDLENBQUM7UUFDdkUsT0FBTyxJQUFJLFNBQUcsQ0FBQyxFQUFFLE1BQU0sRUFBRSxDQUFDLENBQUM7SUFDL0IsQ0FBQztJQUVEOztPQUVHO0lBQ0ksTUFBTSxDQUFDLE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wKHsgb3V0ZGlyLCBzdGFja1RyYWNlczogZmFsc2UgfSk7XG4gICAgICAgIHJldHVybiB0aGlzLnN0dWJWZXJzaW9uKGFwcCk7XG4gICAgfVxuXG4gICAgcHVibGljIHN0YXRpYyBzdHViVmVyc2lvbihhcHA6IEFwcCk6IEFwcCB7XG4gICAgICAgIE5vZGUub2YoYXBwKS5zZXRDb250ZXh0KCdjZGt0ZlZlcnNpb24nLCAnc3R1YmJlZCcpXG4gICAgICAgIHJldHVybiBhcHBcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBSZXR1cm5zIHRoZSBUZXJyYWZvcm0gc3ludGhlc2l6ZWQgSlNPTi5cbiAgICAgKi9cbiAgICBwdWJsaWMgc3RhdGljIHN5bnRoKHN0YWNrOiBUZXJyYWZvcm1TdGFjaykge1xuICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkoc3RhY2sudG9UZXJyYWZvcm0oKSwgbnVsbCwgMilcbiAgICB9XG5cbiAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgbmV4dCAqL1xuICAgIHByaXZhdGUgY29uc3RydWN0b3IoKSB7XG4gICAgICAgIHJldHVybjtcbiAgICB9XG59Il19 |
{ | ||
"name": "cdktf", | ||
"version": "0.0.6-pre.121f0ee9fba2becf3ca31613cdf8b829e1ca8743", | ||
"version": "0.0.6-pre.215a3b1845f05fbe78888441527d037e3b1fce18", | ||
"description": "Cloud Development Kit for Terraform", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
405531
79
3637