UNPKG

@cdktf-providers/andrewchubatiuk-ignition

Version:

Prebuilt AndrewChubatiuk/ignition Provider for Terraform CDK (cdktf)

251 lines (250 loc) 8.65 kB
// https://registry.terraform.io/providers/andrewchubatiuk/ignition/0.0.1/docs/data-sources/filesystem // 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/filesystem ignition_filesystem} */ export class DataIgnitionFilesystem extends cdktf.TerraformDataSource { // ================= // STATIC PROPERTIES // ================= static tfResourceType = "ignition_filesystem"; // ============== // STATIC Methods // ============== /** * Generates CDKTF code for importing a DataIgnitionFilesystem 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 DataIgnitionFilesystem to import * @param importFromId The id of the existing DataIgnitionFilesystem that should be imported. Refer to the {@link https://registry.terraform.io/providers/andrewchubatiuk/ignition/0.0.1/docs/data-sources/filesystem#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the DataIgnitionFilesystem to import is found */ static generateConfigForImport(scope, importToId, importFromId, provider) { return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "ignition_filesystem", importId: importFromId, provider }); } // =========== // INITIALIZER // =========== /** * Create a new {@link https://registry.terraform.io/providers/andrewchubatiuk/ignition/0.0.1/docs/data-sources/filesystem ignition_filesystem} 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 DataIgnitionFilesystemConfig */ constructor(scope, id, config) { super(scope, id, { terraformResourceType: 'ignition_filesystem', 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._device = config.device; this._format = config.format; this._id = config.id; this._label = config.label; this._options = config.options; this._path = config.path; this._uuid = config.uuid; this._wipeFilesystem = config.wipeFilesystem; } // ========== // ATTRIBUTES // ========== // device - computed: false, optional: false, required: true _device; get device() { return this.getStringAttribute('device'); } set device(value) { this._device = value; } // Temporarily expose input value. Use with caution. get deviceInput() { return this._device; } // format - computed: false, optional: false, required: true _format; get format() { return this.getStringAttribute('format'); } set format(value) { this._format = value; } // Temporarily expose input value. Use with caution. get formatInput() { return this._format; } // 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; } // label - computed: false, optional: true, required: false _label; get label() { return this.getStringAttribute('label'); } set label(value) { this._label = value; } resetLabel() { this._label = undefined; } // Temporarily expose input value. Use with caution. get labelInput() { return this._label; } // options - computed: false, optional: true, required: false _options; get options() { return this.getListAttribute('options'); } set options(value) { this._options = value; } resetOptions() { this._options = undefined; } // Temporarily expose input value. Use with caution. get optionsInput() { return this._options; } // path - computed: false, optional: true, required: false _path; get path() { return this.getStringAttribute('path'); } set path(value) { this._path = value; } resetPath() { this._path = undefined; } // 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'); } // uuid - computed: false, optional: true, required: false _uuid; get uuid() { return this.getStringAttribute('uuid'); } set uuid(value) { this._uuid = value; } resetUuid() { this._uuid = undefined; } // Temporarily expose input value. Use with caution. get uuidInput() { return this._uuid; } // wipe_filesystem - computed: false, optional: true, required: false _wipeFilesystem; get wipeFilesystem() { return this.getBooleanAttribute('wipe_filesystem'); } set wipeFilesystem(value) { this._wipeFilesystem = value; } resetWipeFilesystem() { this._wipeFilesystem = undefined; } // Temporarily expose input value. Use with caution. get wipeFilesystemInput() { return this._wipeFilesystem; } // ========= // SYNTHESIS // ========= synthesizeAttributes() { return { device: cdktf.stringToTerraform(this._device), format: cdktf.stringToTerraform(this._format), id: cdktf.stringToTerraform(this._id), label: cdktf.stringToTerraform(this._label), options: cdktf.listMapper(cdktf.stringToTerraform, false)(this._options), path: cdktf.stringToTerraform(this._path), uuid: cdktf.stringToTerraform(this._uuid), wipe_filesystem: cdktf.booleanToTerraform(this._wipeFilesystem), }; } synthesizeHclAttributes() { const attrs = { device: { value: cdktf.stringToHclTerraform(this._device), isBlock: false, type: "simple", storageClassType: "string", }, format: { value: cdktf.stringToHclTerraform(this._format), isBlock: false, type: "simple", storageClassType: "string", }, id: { value: cdktf.stringToHclTerraform(this._id), isBlock: false, type: "simple", storageClassType: "string", }, label: { value: cdktf.stringToHclTerraform(this._label), isBlock: false, type: "simple", storageClassType: "string", }, options: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._options), isBlock: false, type: "list", storageClassType: "stringList", }, path: { value: cdktf.stringToHclTerraform(this._path), isBlock: false, type: "simple", storageClassType: "string", }, uuid: { value: cdktf.stringToHclTerraform(this._uuid), isBlock: false, type: "simple", storageClassType: "string", }, wipe_filesystem: { value: cdktf.booleanToHclTerraform(this._wipeFilesystem), isBlock: false, type: "simple", storageClassType: "boolean", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } }