// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS EC2 */ export interface DataAwsEipConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/eip.html#public_ip DataAwsEip#public_ip} */ readonly publicIp?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/eip.html#tags DataAwsEip#tags} */ readonly tags?: { [key: string]: string } | cdktf.IResolvable; /** * filter block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/eip.html#filter DataAwsEip#filter} */ readonly filter?: DataAwsEipFilter[]; } export interface DataAwsEipFilter { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/eip.html#name DataAwsEip#name} */ readonly name: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/eip.html#values DataAwsEip#values} */ readonly values: string[]; } export function dataAwsEipFilterToTerraform(struct?: DataAwsEipFilter): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { name: cdktf.stringToTerraform(struct!.name), values: cdktf.listMapper(cdktf.stringToTerraform)(struct!.values), } } /** * Represents a {@link https://www.terraform.io/docs/providers/aws/d/eip.html aws_eip} */ export class DataAwsEip extends cdktf.TerraformDataSource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_eip"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/d/eip.html aws_eip} 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 DataAwsEipConfig = {} */ public constructor(scope: Construct, id: string, config: DataAwsEipConfig = {}) { super(scope, id, { terraformResourceType: 'aws_eip', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._publicIp = config.publicIp; this._tags = config.tags; this._filter = config.filter; } // ========== // ATTRIBUTES // ========== // association_id - computed: true, optional: false, required: false public get associationId() { return this.getStringAttribute('association_id'); } // carrier_ip - computed: true, optional: false, required: false public get carrierIp() { return this.getStringAttribute('carrier_ip'); } // customer_owned_ip - computed: true, optional: false, required: false public get customerOwnedIp() { return this.getStringAttribute('customer_owned_ip'); } // customer_owned_ipv4_pool - computed: true, optional: false, required: false public get customerOwnedIpv4Pool() { return this.getStringAttribute('customer_owned_ipv4_pool'); } // domain - computed: true, optional: false, required: false public get domain() { return this.getStringAttribute('domain'); } // id - computed: true, optional: true, required: false public get id() { return this.getStringAttribute('id'); } // instance_id - computed: true, optional: false, required: false public get instanceId() { return this.getStringAttribute('instance_id'); } // network_interface_id - computed: true, optional: false, required: false public get networkInterfaceId() { return this.getStringAttribute('network_interface_id'); } // network_interface_owner_id - computed: true, optional: false, required: false public get networkInterfaceOwnerId() { return this.getStringAttribute('network_interface_owner_id'); } // private_dns - computed: true, optional: false, required: false public get privateDns() { return this.getStringAttribute('private_dns'); } // private_ip - computed: true, optional: false, required: false public get privateIp() { return this.getStringAttribute('private_ip'); } // public_dns - computed: true, optional: false, required: false public get publicDns() { return this.getStringAttribute('public_dns'); } // public_ip - computed: true, optional: true, required: false private _publicIp?: string; public get publicIp() { return this.getStringAttribute('public_ip'); } public set publicIp(value: string) { this._publicIp = value; } public resetPublicIp() { this._publicIp = undefined; } // Temporarily expose input value. Use with caution. public get publicIpInput() { return this._publicIp; } // public_ipv4_pool - computed: true, optional: false, required: false public get publicIpv4Pool() { return this.getStringAttribute('public_ipv4_pool'); } // tags - computed: true, optional: true, required: false private _tags?: { [key: string]: string } | cdktf.IResolvable; public get tags() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('tags') as any; } public set tags(value: { [key: string]: string } | cdktf.IResolvable) { this._tags = value; } public resetTags() { this._tags = undefined; } // Temporarily expose input value. Use with caution. public get tagsInput() { return this._tags; } // filter - computed: false, optional: true, required: false private _filter?: DataAwsEipFilter[]; public get filter() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('filter') as any; } public set filter(value: DataAwsEipFilter[]) { this._filter = value; } public resetFilter() { this._filter = undefined; } // Temporarily expose input value. Use with caution. public get filterInput() { return this._filter; } // ========= // SYNTHESIS // ========= protected synthesizeAttributes(): { [name: string]: any } { return { public_ip: cdktf.stringToTerraform(this._publicIp), tags: cdktf.hashMapper(cdktf.anyToTerraform)(this._tags), filter: cdktf.listMapper(dataAwsEipFilterToTerraform)(this._filter), }; } }