// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS EC2 */ export interface DataAwsEc2TransitGatewayConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/ec2_transit_gateway.html#tags DataAwsEc2TransitGateway#tags} */ readonly tags?: { [key: string]: string } | cdktf.IResolvable; /** * filter block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/ec2_transit_gateway.html#filter DataAwsEc2TransitGateway#filter} */ readonly filter?: DataAwsEc2TransitGatewayFilter[]; } export interface DataAwsEc2TransitGatewayFilter { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/ec2_transit_gateway.html#name DataAwsEc2TransitGateway#name} */ readonly name: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/ec2_transit_gateway.html#values DataAwsEc2TransitGateway#values} */ readonly values: string[]; } export function dataAwsEc2TransitGatewayFilterToTerraform(struct?: DataAwsEc2TransitGatewayFilter): 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/ec2_transit_gateway.html aws_ec2_transit_gateway} */ export class DataAwsEc2TransitGateway extends cdktf.TerraformDataSource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_ec2_transit_gateway"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/d/ec2_transit_gateway.html aws_ec2_transit_gateway} 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 DataAwsEc2TransitGatewayConfig = {} */ public constructor(scope: Construct, id: string, config: DataAwsEc2TransitGatewayConfig = {}) { super(scope, id, { terraformResourceType: 'aws_ec2_transit_gateway', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._tags = config.tags; this._filter = config.filter; } // ========== // ATTRIBUTES // ========== // amazon_side_asn - computed: true, optional: false, required: false public get amazonSideAsn() { return this.getNumberAttribute('amazon_side_asn'); } // arn - computed: true, optional: false, required: false public get arn() { return this.getStringAttribute('arn'); } // association_default_route_table_id - computed: true, optional: false, required: false public get associationDefaultRouteTableId() { return this.getStringAttribute('association_default_route_table_id'); } // auto_accept_shared_attachments - computed: true, optional: false, required: false public get autoAcceptSharedAttachments() { return this.getStringAttribute('auto_accept_shared_attachments'); } // default_route_table_association - computed: true, optional: false, required: false public get defaultRouteTableAssociation() { return this.getStringAttribute('default_route_table_association'); } // default_route_table_propagation - computed: true, optional: false, required: false public get defaultRouteTablePropagation() { return this.getStringAttribute('default_route_table_propagation'); } // description - computed: true, optional: false, required: false public get description() { return this.getStringAttribute('description'); } // dns_support - computed: true, optional: false, required: false public get dnsSupport() { return this.getStringAttribute('dns_support'); } // id - computed: true, optional: true, required: false public get id() { return this.getStringAttribute('id'); } // owner_id - computed: true, optional: false, required: false public get ownerId() { return this.getStringAttribute('owner_id'); } // propagation_default_route_table_id - computed: true, optional: false, required: false public get propagationDefaultRouteTableId() { return this.getStringAttribute('propagation_default_route_table_id'); } // 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; } // vpn_ecmp_support - computed: true, optional: false, required: false public get vpnEcmpSupport() { return this.getStringAttribute('vpn_ecmp_support'); } // filter - computed: false, optional: true, required: false private _filter?: DataAwsEc2TransitGatewayFilter[]; public get filter() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('filter') as any; } public set filter(value: DataAwsEc2TransitGatewayFilter[]) { 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 { tags: cdktf.hashMapper(cdktf.anyToTerraform)(this._tags), filter: cdktf.listMapper(dataAwsEc2TransitGatewayFilterToTerraform)(this._filter), }; } }