UNPKG

@cdktf-providers/andrewchubatiuk-ignition

Version:

Prebuilt AndrewChubatiuk/ignition Provider for Terraform CDK (cdktf)

208 lines (207 loc) 7.08 kB
// https://registry.terraform.io/providers/andrewchubatiuk/ignition/0.0.1/docs/data-sources/directory // generated from terraform resource schema import * as cdktf from 'cdktf'; /** * Represents a {@link https://registry.terraform.io/providers/andrewchubatiuk/ignition/0.0.1/docs/data-sources/directory ignition_directory} */ export class DataIgnitionDirectory extends cdktf.TerraformDataSource { // ================= // STATIC PROPERTIES // ================= static tfResourceType = "ignition_directory"; // ============== // STATIC Methods // ============== /** * Generates CDKTF code for importing a DataIgnitionDirectory resource upon running "cdktf plan <stack-name>" * @param scope The scope in which to define this construct * @param importToId The construct id used in the generated config for the DataIgnitionDirectory to import * @param importFromId The id of the existing DataIgnitionDirectory that should be imported. Refer to the {@link https://registry.terraform.io/providers/andrewchubatiuk/ignition/0.0.1/docs/data-sources/directory#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the DataIgnitionDirectory to import is found */ static generateConfigForImport(scope, importToId, importFromId, provider) { return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "ignition_directory", importId: importFromId, provider }); } // =========== // INITIALIZER // =========== /** * Create a new {@link https://registry.terraform.io/providers/andrewchubatiuk/ignition/0.0.1/docs/data-sources/directory ignition_directory} Data Source * * @param scope The scope in which to define this construct * @param id The scoped construct ID. Must be unique amongst siblings in the same scope * @param options DataIgnitionDirectoryConfig */ constructor(scope, id, config) { super(scope, id, { terraformResourceType: 'ignition_directory', terraformGeneratorMetadata: { providerName: 'ignition', providerVersion: '0.0.1', providerVersionConstraint: '0.0.1' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle, provisioners: config.provisioners, connection: config.connection, forEach: config.forEach }); this._gid = config.gid; this._id = config.id; this._mode = config.mode; this._overwrite = config.overwrite; this._path = config.path; this._uid = config.uid; } // ========== // ATTRIBUTES // ========== // gid - computed: false, optional: true, required: false _gid; get gid() { return this.getNumberAttribute('gid'); } set gid(value) { this._gid = value; } resetGid() { this._gid = undefined; } // Temporarily expose input value. Use with caution. get gidInput() { return this._gid; } // id - computed: true, optional: true, required: false _id; get id() { return this.getStringAttribute('id'); } set id(value) { this._id = value; } resetId() { this._id = undefined; } // Temporarily expose input value. Use with caution. get idInput() { return this._id; } // mode - computed: false, optional: true, required: false _mode; get mode() { return this.getNumberAttribute('mode'); } set mode(value) { this._mode = value; } resetMode() { this._mode = undefined; } // Temporarily expose input value. Use with caution. get modeInput() { return this._mode; } // overwrite - computed: false, optional: true, required: false _overwrite; get overwrite() { return this.getBooleanAttribute('overwrite'); } set overwrite(value) { this._overwrite = value; } resetOverwrite() { this._overwrite = undefined; } // Temporarily expose input value. Use with caution. get overwriteInput() { return this._overwrite; } // path - computed: false, optional: false, required: true _path; get path() { return this.getStringAttribute('path'); } set path(value) { this._path = value; } // Temporarily expose input value. Use with caution. get pathInput() { return this._path; } // rendered - computed: true, optional: false, required: false get rendered() { return this.getStringAttribute('rendered'); } // uid - computed: false, optional: true, required: false _uid; get uid() { return this.getNumberAttribute('uid'); } set uid(value) { this._uid = value; } resetUid() { this._uid = undefined; } // Temporarily expose input value. Use with caution. get uidInput() { return this._uid; } // ========= // SYNTHESIS // ========= synthesizeAttributes() { return { gid: cdktf.numberToTerraform(this._gid), id: cdktf.stringToTerraform(this._id), mode: cdktf.numberToTerraform(this._mode), overwrite: cdktf.booleanToTerraform(this._overwrite), path: cdktf.stringToTerraform(this._path), uid: cdktf.numberToTerraform(this._uid), }; } synthesizeHclAttributes() { const attrs = { gid: { value: cdktf.numberToHclTerraform(this._gid), isBlock: false, type: "simple", storageClassType: "number", }, id: { value: cdktf.stringToHclTerraform(this._id), isBlock: false, type: "simple", storageClassType: "string", }, mode: { value: cdktf.numberToHclTerraform(this._mode), isBlock: false, type: "simple", storageClassType: "number", }, overwrite: { value: cdktf.booleanToHclTerraform(this._overwrite), isBlock: false, type: "simple", storageClassType: "boolean", }, path: { value: cdktf.stringToHclTerraform(this._path), isBlock: false, type: "simple", storageClassType: "string", }, uid: { value: cdktf.numberToHclTerraform(this._uid), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } }