UNPKG

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

Version:

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

162 lines (161 loc) 5.81 kB
// https://registry.terraform.io/providers/community-terraform-providers/ignition/2.5.1/docs/data-sources/group // 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/group ignition_group} */ export class DataIgnitionGroup extends cdktf.TerraformDataSource { // ================= // STATIC PROPERTIES // ================= static tfResourceType = "ignition_group"; // ============== // STATIC Methods // ============== /** * Generates CDKTF code for importing a DataIgnitionGroup 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 DataIgnitionGroup to import * @param importFromId The id of the existing DataIgnitionGroup that should be imported. Refer to the {@link https://registry.terraform.io/providers/community-terraform-providers/ignition/2.5.1/docs/data-sources/group#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the DataIgnitionGroup to import is found */ static generateConfigForImport(scope, importToId, importFromId, provider) { return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "ignition_group", importId: importFromId, provider }); } // =========== // INITIALIZER // =========== /** * Create a new {@link https://registry.terraform.io/providers/community-terraform-providers/ignition/2.5.1/docs/data-sources/group ignition_group} 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 DataIgnitionGroupConfig */ constructor(scope, id, config) { super(scope, id, { terraformResourceType: 'ignition_group', 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._id = config.id; this._name = config.name; this._passwordHash = config.passwordHash; } // ========== // 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; } // name - computed: false, optional: false, required: true _name; get name() { return this.getStringAttribute('name'); } set name(value) { this._name = value; } // Temporarily expose input value. Use with caution. get nameInput() { return this._name; } // password_hash - computed: false, optional: true, required: false _passwordHash; get passwordHash() { return this.getStringAttribute('password_hash'); } set passwordHash(value) { this._passwordHash = value; } resetPasswordHash() { this._passwordHash = undefined; } // Temporarily expose input value. Use with caution. get passwordHashInput() { return this._passwordHash; } // rendered - computed: true, optional: false, required: false get rendered() { return this.getStringAttribute('rendered'); } // ========= // SYNTHESIS // ========= synthesizeAttributes() { return { gid: cdktf.numberToTerraform(this._gid), id: cdktf.stringToTerraform(this._id), name: cdktf.stringToTerraform(this._name), password_hash: cdktf.stringToTerraform(this._passwordHash), }; } 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", }, name: { value: cdktf.stringToHclTerraform(this._name), isBlock: false, type: "simple", storageClassType: "string", }, password_hash: { value: cdktf.stringToHclTerraform(this._passwordHash), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } }