// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS EC2 */ export interface Ec2TransitGatewayRouteTableAssociationConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/ec2_transit_gateway_route_table_association.html#transit_gateway_attachment_id Ec2TransitGatewayRouteTableAssociation#transit_gateway_attachment_id} */ readonly transitGatewayAttachmentId: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/ec2_transit_gateway_route_table_association.html#transit_gateway_route_table_id Ec2TransitGatewayRouteTableAssociation#transit_gateway_route_table_id} */ readonly transitGatewayRouteTableId: string; } /** * Represents a {@link https://www.terraform.io/docs/providers/aws/r/ec2_transit_gateway_route_table_association.html aws_ec2_transit_gateway_route_table_association} */ export class Ec2TransitGatewayRouteTableAssociation extends cdktf.TerraformResource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_ec2_transit_gateway_route_table_association"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/r/ec2_transit_gateway_route_table_association.html aws_ec2_transit_gateway_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 Ec2TransitGatewayRouteTableAssociationConfig */ public constructor(scope: Construct, id: string, config: Ec2TransitGatewayRouteTableAssociationConfig) { super(scope, id, { terraformResourceType: 'aws_ec2_transit_gateway_route_table_association', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._transitGatewayAttachmentId = config.transitGatewayAttachmentId; this._transitGatewayRouteTableId = config.transitGatewayRouteTableId; } // ========== // ATTRIBUTES // ========== // id - computed: true, optional: true, required: false public get id() { return this.getStringAttribute('id'); } // resource_id - computed: true, optional: false, required: false public get resourceId() { return this.getStringAttribute('resource_id'); } // resource_type - computed: true, optional: false, required: false public get resourceType() { return this.getStringAttribute('resource_type'); } // transit_gateway_attachment_id - computed: false, optional: false, required: true private _transitGatewayAttachmentId?: string; public get transitGatewayAttachmentId() { return this.getStringAttribute('transit_gateway_attachment_id'); } public set transitGatewayAttachmentId(value: string) { this._transitGatewayAttachmentId = value; } // Temporarily expose input value. Use with caution. public get transitGatewayAttachmentIdInput() { return this._transitGatewayAttachmentId; } // transit_gateway_route_table_id - computed: false, optional: false, required: true private _transitGatewayRouteTableId?: string; public get transitGatewayRouteTableId() { return this.getStringAttribute('transit_gateway_route_table_id'); } public set transitGatewayRouteTableId(value: string) { this._transitGatewayRouteTableId = value; } // Temporarily expose input value. Use with caution. public get transitGatewayRouteTableIdInput() { return this._transitGatewayRouteTableId; } // ========= // SYNTHESIS // ========= protected synthesizeAttributes(): { [name: string]: any } { return { transit_gateway_attachment_id: cdktf.stringToTerraform(this._transitGatewayAttachmentId), transit_gateway_route_table_id: cdktf.stringToTerraform(this._transitGatewayRouteTableId), }; } }