// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS VPC */ export interface VpcPeeringConnectionOptionsConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/vpc_peering_connection_options.html#vpc_peering_connection_id VpcPeeringConnectionOptions#vpc_peering_connection_id} */ readonly vpcPeeringConnectionId: string; /** * accepter block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/vpc_peering_connection_options.html#accepter VpcPeeringConnectionOptions#accepter} */ readonly accepter?: VpcPeeringConnectionOptionsAccepter; /** * requester block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/vpc_peering_connection_options.html#requester VpcPeeringConnectionOptions#requester} */ readonly requester?: VpcPeeringConnectionOptionsRequester; } export interface VpcPeeringConnectionOptionsAccepter { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/vpc_peering_connection_options.html#allow_classic_link_to_remote_vpc VpcPeeringConnectionOptions#allow_classic_link_to_remote_vpc} */ readonly allowClassicLinkToRemoteVpc?: boolean | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/vpc_peering_connection_options.html#allow_remote_vpc_dns_resolution VpcPeeringConnectionOptions#allow_remote_vpc_dns_resolution} */ readonly allowRemoteVpcDnsResolution?: boolean | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/vpc_peering_connection_options.html#allow_vpc_to_remote_classic_link VpcPeeringConnectionOptions#allow_vpc_to_remote_classic_link} */ readonly allowVpcToRemoteClassicLink?: boolean | cdktf.IResolvable; } export function vpcPeeringConnectionOptionsAccepterToTerraform(struct?: VpcPeeringConnectionOptionsAccepterOutputReference | VpcPeeringConnectionOptionsAccepter): 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 { allow_classic_link_to_remote_vpc: cdktf.booleanToTerraform(struct!.allowClassicLinkToRemoteVpc), allow_remote_vpc_dns_resolution: cdktf.booleanToTerraform(struct!.allowRemoteVpcDnsResolution), allow_vpc_to_remote_classic_link: cdktf.booleanToTerraform(struct!.allowVpcToRemoteClassicLink), } } export class VpcPeeringConnectionOptionsAccepterOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): VpcPeeringConnectionOptionsAccepter | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._allowClassicLinkToRemoteVpc !== undefined) { hasAnyValues = true; internalValueResult.allowClassicLinkToRemoteVpc = this._allowClassicLinkToRemoteVpc; } if (this._allowRemoteVpcDnsResolution !== undefined) { hasAnyValues = true; internalValueResult.allowRemoteVpcDnsResolution = this._allowRemoteVpcDnsResolution; } if (this._allowVpcToRemoteClassicLink !== undefined) { hasAnyValues = true; internalValueResult.allowVpcToRemoteClassicLink = this._allowVpcToRemoteClassicLink; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: VpcPeeringConnectionOptionsAccepter | undefined) { if (value === undefined) { this.isEmptyObject = false; this._allowClassicLinkToRemoteVpc = undefined; this._allowRemoteVpcDnsResolution = undefined; this._allowVpcToRemoteClassicLink = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._allowClassicLinkToRemoteVpc = value.allowClassicLinkToRemoteVpc; this._allowRemoteVpcDnsResolution = value.allowRemoteVpcDnsResolution; this._allowVpcToRemoteClassicLink = value.allowVpcToRemoteClassicLink; } } // allow_classic_link_to_remote_vpc - computed: false, optional: true, required: false private _allowClassicLinkToRemoteVpc?: boolean | cdktf.IResolvable; public get allowClassicLinkToRemoteVpc() { return this.getBooleanAttribute('allow_classic_link_to_remote_vpc') as any; } public set allowClassicLinkToRemoteVpc(value: boolean | cdktf.IResolvable) { this._allowClassicLinkToRemoteVpc = value; } public resetAllowClassicLinkToRemoteVpc() { this._allowClassicLinkToRemoteVpc = undefined; } // Temporarily expose input value. Use with caution. public get allowClassicLinkToRemoteVpcInput() { return this._allowClassicLinkToRemoteVpc; } // allow_remote_vpc_dns_resolution - computed: false, optional: true, required: false private _allowRemoteVpcDnsResolution?: boolean | cdktf.IResolvable; public get allowRemoteVpcDnsResolution() { return this.getBooleanAttribute('allow_remote_vpc_dns_resolution') as any; } public set allowRemoteVpcDnsResolution(value: boolean | cdktf.IResolvable) { this._allowRemoteVpcDnsResolution = value; } public resetAllowRemoteVpcDnsResolution() { this._allowRemoteVpcDnsResolution = undefined; } // Temporarily expose input value. Use with caution. public get allowRemoteVpcDnsResolutionInput() { return this._allowRemoteVpcDnsResolution; } // allow_vpc_to_remote_classic_link - computed: false, optional: true, required: false private _allowVpcToRemoteClassicLink?: boolean | cdktf.IResolvable; public get allowVpcToRemoteClassicLink() { return this.getBooleanAttribute('allow_vpc_to_remote_classic_link') as any; } public set allowVpcToRemoteClassicLink(value: boolean | cdktf.IResolvable) { this._allowVpcToRemoteClassicLink = value; } public resetAllowVpcToRemoteClassicLink() { this._allowVpcToRemoteClassicLink = undefined; } // Temporarily expose input value. Use with caution. public get allowVpcToRemoteClassicLinkInput() { return this._allowVpcToRemoteClassicLink; } } export interface VpcPeeringConnectionOptionsRequester { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/vpc_peering_connection_options.html#allow_classic_link_to_remote_vpc VpcPeeringConnectionOptions#allow_classic_link_to_remote_vpc} */ readonly allowClassicLinkToRemoteVpc?: boolean | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/vpc_peering_connection_options.html#allow_remote_vpc_dns_resolution VpcPeeringConnectionOptions#allow_remote_vpc_dns_resolution} */ readonly allowRemoteVpcDnsResolution?: boolean | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/vpc_peering_connection_options.html#allow_vpc_to_remote_classic_link VpcPeeringConnectionOptions#allow_vpc_to_remote_classic_link} */ readonly allowVpcToRemoteClassicLink?: boolean | cdktf.IResolvable; } export function vpcPeeringConnectionOptionsRequesterToTerraform(struct?: VpcPeeringConnectionOptionsRequesterOutputReference | VpcPeeringConnectionOptionsRequester): 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 { allow_classic_link_to_remote_vpc: cdktf.booleanToTerraform(struct!.allowClassicLinkToRemoteVpc), allow_remote_vpc_dns_resolution: cdktf.booleanToTerraform(struct!.allowRemoteVpcDnsResolution), allow_vpc_to_remote_classic_link: cdktf.booleanToTerraform(struct!.allowVpcToRemoteClassicLink), } } export class VpcPeeringConnectionOptionsRequesterOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): VpcPeeringConnectionOptionsRequester | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._allowClassicLinkToRemoteVpc !== undefined) { hasAnyValues = true; internalValueResult.allowClassicLinkToRemoteVpc = this._allowClassicLinkToRemoteVpc; } if (this._allowRemoteVpcDnsResolution !== undefined) { hasAnyValues = true; internalValueResult.allowRemoteVpcDnsResolution = this._allowRemoteVpcDnsResolution; } if (this._allowVpcToRemoteClassicLink !== undefined) { hasAnyValues = true; internalValueResult.allowVpcToRemoteClassicLink = this._allowVpcToRemoteClassicLink; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: VpcPeeringConnectionOptionsRequester | undefined) { if (value === undefined) { this.isEmptyObject = false; this._allowClassicLinkToRemoteVpc = undefined; this._allowRemoteVpcDnsResolution = undefined; this._allowVpcToRemoteClassicLink = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._allowClassicLinkToRemoteVpc = value.allowClassicLinkToRemoteVpc; this._allowRemoteVpcDnsResolution = value.allowRemoteVpcDnsResolution; this._allowVpcToRemoteClassicLink = value.allowVpcToRemoteClassicLink; } } // allow_classic_link_to_remote_vpc - computed: false, optional: true, required: false private _allowClassicLinkToRemoteVpc?: boolean | cdktf.IResolvable; public get allowClassicLinkToRemoteVpc() { return this.getBooleanAttribute('allow_classic_link_to_remote_vpc') as any; } public set allowClassicLinkToRemoteVpc(value: boolean | cdktf.IResolvable) { this._allowClassicLinkToRemoteVpc = value; } public resetAllowClassicLinkToRemoteVpc() { this._allowClassicLinkToRemoteVpc = undefined; } // Temporarily expose input value. Use with caution. public get allowClassicLinkToRemoteVpcInput() { return this._allowClassicLinkToRemoteVpc; } // allow_remote_vpc_dns_resolution - computed: false, optional: true, required: false private _allowRemoteVpcDnsResolution?: boolean | cdktf.IResolvable; public get allowRemoteVpcDnsResolution() { return this.getBooleanAttribute('allow_remote_vpc_dns_resolution') as any; } public set allowRemoteVpcDnsResolution(value: boolean | cdktf.IResolvable) { this._allowRemoteVpcDnsResolution = value; } public resetAllowRemoteVpcDnsResolution() { this._allowRemoteVpcDnsResolution = undefined; } // Temporarily expose input value. Use with caution. public get allowRemoteVpcDnsResolutionInput() { return this._allowRemoteVpcDnsResolution; } // allow_vpc_to_remote_classic_link - computed: false, optional: true, required: false private _allowVpcToRemoteClassicLink?: boolean | cdktf.IResolvable; public get allowVpcToRemoteClassicLink() { return this.getBooleanAttribute('allow_vpc_to_remote_classic_link') as any; } public set allowVpcToRemoteClassicLink(value: boolean | cdktf.IResolvable) { this._allowVpcToRemoteClassicLink = value; } public resetAllowVpcToRemoteClassicLink() { this._allowVpcToRemoteClassicLink = undefined; } // Temporarily expose input value. Use with caution. public get allowVpcToRemoteClassicLinkInput() { return this._allowVpcToRemoteClassicLink; } } /** * Represents a {@link https://www.terraform.io/docs/providers/aws/r/vpc_peering_connection_options.html aws_vpc_peering_connection_options} */ export class VpcPeeringConnectionOptions extends cdktf.TerraformResource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_vpc_peering_connection_options"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/r/vpc_peering_connection_options.html aws_vpc_peering_connection_options} 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 VpcPeeringConnectionOptionsConfig */ public constructor(scope: Construct, id: string, config: VpcPeeringConnectionOptionsConfig) { super(scope, id, { terraformResourceType: 'aws_vpc_peering_connection_options', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._vpcPeeringConnectionId = config.vpcPeeringConnectionId; this._accepter.internalValue = config.accepter; this._requester.internalValue = config.requester; } // ========== // ATTRIBUTES // ========== // id - computed: true, optional: true, required: false public get id() { return this.getStringAttribute('id'); } // vpc_peering_connection_id - computed: false, optional: false, required: true private _vpcPeeringConnectionId?: string; public get vpcPeeringConnectionId() { return this.getStringAttribute('vpc_peering_connection_id'); } public set vpcPeeringConnectionId(value: string) { this._vpcPeeringConnectionId = value; } // Temporarily expose input value. Use with caution. public get vpcPeeringConnectionIdInput() { return this._vpcPeeringConnectionId; } // accepter - computed: false, optional: true, required: false private _accepter = new VpcPeeringConnectionOptionsAccepterOutputReference(this as any, "accepter", true); public get accepter() { return this._accepter; } public putAccepter(value: VpcPeeringConnectionOptionsAccepter) { this._accepter.internalValue = value; } public resetAccepter() { this._accepter.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get accepterInput() { return this._accepter.internalValue; } // requester - computed: false, optional: true, required: false private _requester = new VpcPeeringConnectionOptionsRequesterOutputReference(this as any, "requester", true); public get requester() { return this._requester; } public putRequester(value: VpcPeeringConnectionOptionsRequester) { this._requester.internalValue = value; } public resetRequester() { this._requester.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get requesterInput() { return this._requester.internalValue; } // ========= // SYNTHESIS // ========= protected synthesizeAttributes(): { [name: string]: any } { return { vpc_peering_connection_id: cdktf.stringToTerraform(this._vpcPeeringConnectionId), accepter: vpcPeeringConnectionOptionsAccepterToTerraform(this._accepter.internalValue), requester: vpcPeeringConnectionOptionsRequesterToTerraform(this._requester.internalValue), }; } }