UNPKG

@cdktf-providers/community-terraform-providers-ignition

Version:

Prebuilt community-terraform-providers/ignition Provider for Terraform CDK (cdktf)

228 lines (227 loc) 7.7 kB
// https://registry.terraform.io/providers/community-terraform-providers/ignition/2.5.1/docs/data-sources/link // generated from terraform resource schema import * as cdktf from 'cdktf'; /** * Represents a {@link https://registry.terraform.io/providers/community-terraform-providers/ignition/2.5.1/docs/data-sources/link ignition_link} */ export class DataIgnitionLink extends cdktf.TerraformDataSource { // ================= // STATIC PROPERTIES // ================= static tfResourceType = "ignition_link"; // ============== // STATIC Methods // ============== /** * Generates CDKTF code for importing a DataIgnitionLink 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 DataIgnitionLink to import * @param importFromId The id of the existing DataIgnitionLink that should be imported. Refer to the {@link https://registry.terraform.io/providers/community-terraform-providers/ignition/2.5.1/docs/data-sources/link#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the DataIgnitionLink to import is found */ static generateConfigForImport(scope, importToId, importFromId, provider) { return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "ignition_link", importId: importFromId, provider }); } // =========== // INITIALIZER // =========== /** * Create a new {@link https://registry.terraform.io/providers/community-terraform-providers/ignition/2.5.1/docs/data-sources/link ignition_link} 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 DataIgnitionLinkConfig */ constructor(scope, id, config) { super(scope, id, { terraformResourceType: 'ignition_link', terraformGeneratorMetadata: { providerName: 'ignition', providerVersion: '2.5.1', providerVersionConstraint: '2.5.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._hard = config.hard; this._id = config.id; this._overwrite = config.overwrite; this._path = config.path; this._target = config.target; 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; } // hard - computed: false, optional: true, required: false _hard; get hard() { return this.getBooleanAttribute('hard'); } set hard(value) { this._hard = value; } resetHard() { this._hard = undefined; } // Temporarily expose input value. Use with caution. get hardInput() { return this._hard; } // 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; } // 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'); } // target - computed: false, optional: false, required: true _target; get target() { return this.getStringAttribute('target'); } set target(value) { this._target = value; } // Temporarily expose input value. Use with caution. get targetInput() { return this._target; } // 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), hard: cdktf.booleanToTerraform(this._hard), id: cdktf.stringToTerraform(this._id), overwrite: cdktf.booleanToTerraform(this._overwrite), path: cdktf.stringToTerraform(this._path), target: cdktf.stringToTerraform(this._target), uid: cdktf.numberToTerraform(this._uid), }; } synthesizeHclAttributes() { const attrs = { gid: { value: cdktf.numberToHclTerraform(this._gid), isBlock: false, type: "simple", storageClassType: "number", }, hard: { value: cdktf.booleanToHclTerraform(this._hard), isBlock: false, type: "simple", storageClassType: "boolean", }, id: { value: cdktf.stringToHclTerraform(this._id), isBlock: false, type: "simple", storageClassType: "string", }, overwrite: { value: cdktf.booleanToHclTerraform(this._overwrite), isBlock: false, type: "simple", storageClassType: "boolean", }, path: { value: cdktf.stringToHclTerraform(this._path), isBlock: false, type: "simple", storageClassType: "string", }, target: { value: cdktf.stringToHclTerraform(this._target), 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)); } }