// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS VPC */ export interface RouteTableAssociationConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/route_table_association.html#gateway_id RouteTableAssociation#gateway_id} */ readonly gatewayId?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/route_table_association.html#route_table_id RouteTableAssociation#route_table_id} */ readonly routeTableId: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/route_table_association.html#subnet_id RouteTableAssociation#subnet_id} */ readonly subnetId?: string; } /** * Represents a {@link https://www.terraform.io/docs/providers/aws/r/route_table_association.html aws_route_table_association} */ export class RouteTableAssociation extends cdktf.TerraformResource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_route_table_association"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/r/route_table_association.html aws_route_table_association} Resource * * @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 RouteTableAssociationConfig */ public constructor(scope: Construct, id: string, config: RouteTableAssociationConfig) { super(scope, id, { terraformResourceType: 'aws_route_table_association', 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; } // ========== // ATTRIBUTES // ========== // gateway_id - computed: false, 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'); } // route_table_id - computed: false, optional: false, required: true private _routeTableId?: string; public get routeTableId() { return this.getStringAttribute('route_table_id'); } public set routeTableId(value: string) { this._routeTableId = value; } // Temporarily expose input value. Use with caution. public get routeTableIdInput() { return this._routeTableId; } // subnet_id - computed: false, 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; } // ========= // 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), }; } }