// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS VPC */ export interface DataAwsRouteTableConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/route_table.html#gateway_id DataAwsRouteTable#gateway_id} */ readonly gatewayId?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/route_table.html#route_table_id DataAwsRouteTable#route_table_id} */ readonly routeTableId?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/route_table.html#subnet_id DataAwsRouteTable#subnet_id} */ readonly subnetId?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/route_table.html#tags DataAwsRouteTable#tags} */ readonly tags?: { [key: string]: string } | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/route_table.html#vpc_id DataAwsRouteTable#vpc_id} */ readonly vpcId?: string; /** * filter block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/route_table.html#filter DataAwsRouteTable#filter} */ readonly filter?: DataAwsRouteTableFilter[]; } export class DataAwsRouteTableAssociations extends cdktf.ComplexComputedList { // gateway_id - computed: true, optional: false, required: false public get gatewayId() { return this.getStringAttribute('gateway_id'); } // main - computed: true, optional: false, required: false public get main() { return this.getBooleanAttribute('main') as any; } // route_table_association_id - computed: true, optional: false, required: false public get routeTableAssociationId() { return this.getStringAttribute('route_table_association_id'); } // route_table_id - computed: true, optional: false, required: false public get routeTableId() { return this.getStringAttribute('route_table_id'); } // subnet_id - computed: true, optional: false, required: false public get subnetId() { return this.getStringAttribute('subnet_id'); } } export class DataAwsRouteTableRoutes extends cdktf.ComplexComputedList { // carrier_gateway_id - computed: true, optional: false, required: false public get carrierGatewayId() { return this.getStringAttribute('carrier_gateway_id'); } // cidr_block - computed: true, optional: false, required: false public get cidrBlock() { return this.getStringAttribute('cidr_block'); } // destination_prefix_list_id - computed: true, optional: false, required: false public get destinationPrefixListId() { return this.getStringAttribute('destination_prefix_list_id'); } // egress_only_gateway_id - computed: true, optional: false, required: false public get egressOnlyGatewayId() { return this.getStringAttribute('egress_only_gateway_id'); } // gateway_id - computed: true, optional: false, required: false public get gatewayId() { return this.getStringAttribute('gateway_id'); } // instance_id - computed: true, optional: false, required: false public get instanceId() { return this.getStringAttribute('instance_id'); } // ipv6_cidr_block - computed: true, optional: false, required: false public get ipv6CidrBlock() { return this.getStringAttribute('ipv6_cidr_block'); } // local_gateway_id - computed: true, optional: false, required: false public get localGatewayId() { return this.getStringAttribute('local_gateway_id'); } // nat_gateway_id - computed: true, optional: false, required: false public get natGatewayId() { return this.getStringAttribute('nat_gateway_id'); } // network_interface_id - computed: true, optional: false, required: false public get networkInterfaceId() { return this.getStringAttribute('network_interface_id'); } // transit_gateway_id - computed: true, optional: false, required: false public get transitGatewayId() { return this.getStringAttribute('transit_gateway_id'); } // vpc_endpoint_id - computed: true, optional: false, required: false public get vpcEndpointId() { return this.getStringAttribute('vpc_endpoint_id'); } // vpc_peering_connection_id - computed: true, optional: false, required: false public get vpcPeeringConnectionId() { return this.getStringAttribute('vpc_peering_connection_id'); } } export interface DataAwsRouteTableFilter { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/route_table.html#name DataAwsRouteTable#name} */ readonly name: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/route_table.html#values DataAwsRouteTable#values} */ readonly values: string[]; } export function dataAwsRouteTableFilterToTerraform(struct?: DataAwsRouteTableFilter): 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/route_table.html aws_route_table} */ export class DataAwsRouteTable extends cdktf.TerraformDataSource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_route_table"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/d/route_table.html aws_route_table} 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 DataAwsRouteTableConfig = {} */ public constructor(scope: Construct, id: string, config: DataAwsRouteTableConfig = {}) { super(scope, id, { terraformResourceType: 'aws_route_table', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._gatewayId = config.gatewayId; this._routeTableId = config.routeTableId; this._subnetId = config.subnetId; this._tags = config.tags; this._vpcId = config.vpcId; this._filter = config.filter; } // ========== // ATTRIBUTES // ========== // arn - computed: true, optional: false, required: false public get arn() { return this.getStringAttribute('arn'); } // associations - computed: true, optional: false, required: false public associations(index: string) { return new DataAwsRouteTableAssociations(this, 'associations', index); } // gateway_id - computed: true, optional: true, required: false private _gatewayId?: string; public get gatewayId() { return this.getStringAttribute('gateway_id'); } public set gatewayId(value: string) { this._gatewayId = value; } public resetGatewayId() { this._gatewayId = undefined; } // Temporarily expose input value. Use with caution. public get gatewayIdInput() { return this._gatewayId; } // 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'); } // route_table_id - computed: true, optional: true, required: false private _routeTableId?: string; public get routeTableId() { return this.getStringAttribute('route_table_id'); } public set routeTableId(value: string) { this._routeTableId = value; } public resetRouteTableId() { this._routeTableId = undefined; } // Temporarily expose input value. Use with caution. public get routeTableIdInput() { return this._routeTableId; } // routes - computed: true, optional: false, required: false public routes(index: string) { return new DataAwsRouteTableRoutes(this, 'routes', index); } // subnet_id - computed: true, optional: true, required: false private _subnetId?: string; public get subnetId() { return this.getStringAttribute('subnet_id'); } public set subnetId(value: string) { this._subnetId = value; } public resetSubnetId() { this._subnetId = undefined; } // Temporarily expose input value. Use with caution. public get subnetIdInput() { return this._subnetId; } // 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; } // vpc_id - computed: true, optional: true, required: false private _vpcId?: string; public get vpcId() { return this.getStringAttribute('vpc_id'); } public set vpcId(value: string) { this._vpcId = value; } public resetVpcId() { this._vpcId = undefined; } // Temporarily expose input value. Use with caution. public get vpcIdInput() { return this._vpcId; } // filter - computed: false, optional: true, required: false private _filter?: DataAwsRouteTableFilter[]; public get filter() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('filter') as any; } public set filter(value: DataAwsRouteTableFilter[]) { 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 { gateway_id: cdktf.stringToTerraform(this._gatewayId), route_table_id: cdktf.stringToTerraform(this._routeTableId), subnet_id: cdktf.stringToTerraform(this._subnetId), tags: cdktf.hashMapper(cdktf.anyToTerraform)(this._tags), vpc_id: cdktf.stringToTerraform(this._vpcId), filter: cdktf.listMapper(dataAwsRouteTableFilterToTerraform)(this._filter), }; } }