import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Provides a resource to manage the accepter's side of a VPC Peering Connection. * * When a cross-account (requester's AWS account differs from the accepter's AWS account) or an inter-region * VPC Peering Connection is created, a VPC Peering Connection resource is automatically created in the * accepter's account. * The requester can use the `aws.ec2.VpcPeeringConnection` resource to manage its side of the connection * and the accepter can use the `aws.ec2.VpcPeeringConnectionAccepter` resource to "adopt" its side of the * connection into management. * * > **Note:** AWS allows a cross-account VPC Peering Connection to be deleted from either the requester's or accepter's side. However, this provider only allows the VPC Peering Connection to be deleted from the requester's side by removing the corresponding `aws.ec2.VpcPeeringConnection` resource from your configuration. Removing a `aws.ec2.VpcPeeringConnectionAccepter` resource from your configuration will remove it from your statefile and management, **but will not destroy the VPC Peering Connection.** * * ## Example Usage * * ### Cross-Account Peering Or Cross-Region Peering AWS Provider v6 (and below) * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const main = new aws.ec2.Vpc("main", {cidrBlock: "10.0.0.0/16"}); * const peerVpc = new aws.ec2.Vpc("peer", {cidrBlock: "10.1.0.0/16"}); * const peer = aws.getCallerIdentity({}); * // Requester's side of the connection. * const peerVpcPeeringConnection = new aws.ec2.VpcPeeringConnection("peer", { * vpcId: main.id, * peerVpcId: peerVpc.id, * peerOwnerId: peer.then(peer => peer.accountId), * peerRegion: "us-west-2", * autoAccept: false, * tags: { * Side: "Requester", * }, * }); * // Accepter's side of the connection. * const peerVpcPeeringConnectionAccepter = new aws.ec2.VpcPeeringConnectionAccepter("peer", { * vpcPeeringConnectionId: peerVpcPeeringConnection.id, * autoAccept: true, * tags: { * Side: "Accepter", * }, * }); * ``` * * ### Cross-Region Peering (Same Account) AWS Provider v7 (and above) * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const main = new aws.ec2.Vpc("main", {cidrBlock: "10.0.0.0/16"}); * const peer = new aws.ec2.Vpc("peer", { * region: "us-west-2", * cidrBlock: "10.1.0.0/16", * }); * // Requester's side of the connection. * const peerVpcPeeringConnection = new aws.ec2.VpcPeeringConnection("peer", { * vpcId: main.id, * peerVpcId: peer.id, * peerRegion: "us-west-2", * autoAccept: false, * tags: { * Side: "Requester", * }, * }); * // Accepter's side of the connection. * const peerVpcPeeringConnectionAccepter = new aws.ec2.VpcPeeringConnectionAccepter("peer", { * region: "us-west-2", * vpcPeeringConnectionId: peerVpcPeeringConnection.id, * autoAccept: true, * tags: { * Side: "Accepter", * }, * }); * ``` * * ## Import * * Using `pulumi import`, import VPC Peering Connection Accepters using the Peering Connection ID. For example: * * ```sh * $ pulumi import aws:ec2/vpcPeeringConnectionAccepter:VpcPeeringConnectionAccepter example pcx-12345678 * ``` * * Certain resource arguments, like `autoAccept`, do not have an EC2 API method for reading the information after peering connection creation. If the argument is set in the Pulumi program on an imported resource, Pulumi will always show a difference. To workaround this behavior, either omit the argument from the Pulumi program or use `ignoreChanges` to hide the difference. For example: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.ec2.VpcPeeringConnectionAccepter("example", {}, { * ignoreChanges: ["autoAccept"], * }); * ``` */ export declare class VpcPeeringConnectionAccepter extends pulumi.CustomResource { /** * Get an existing VpcPeeringConnectionAccepter resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: VpcPeeringConnectionAccepterState, opts?: pulumi.CustomResourceOptions): VpcPeeringConnectionAccepter; /** * Check whether an existing VpcPeeringConnectionAccepter resource with the given ID exists. * * @param id The _unique_ provider ID of the resource to check. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static exists(id: pulumi.Input, state?: VpcPeeringConnectionAccepterState, opts?: pulumi.CustomResourceOptions): pulumi.Output; /** * Returns true if the given object is an instance of VpcPeeringConnectionAccepter. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is VpcPeeringConnectionAccepter; /** * Status of the VPC Peering Connection request. */ readonly acceptStatus: pulumi.Output; /** * Configuration block for [VPC Peering Connection](https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html) options to set for the VPC that accepts the peering connection (a maximum of one). See `accepter` Block below. */ readonly accepter: pulumi.Output; /** * Whether or not to accept the peering request. Defaults to `false`. */ readonly autoAccept: pulumi.Output; /** * AWS account ID of the owner of the requester VPC. */ readonly peerOwnerId: pulumi.Output; /** * Region of the accepter VPC. */ readonly peerRegion: pulumi.Output; /** * ID of the requester VPC. */ readonly peerVpcId: pulumi.Output; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output; /** * Configuration block for [VPC Peering Connection](https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html) options to set for the VPC that requests the peering connection (a maximum of one). See `requester` Block below. */ readonly requester: pulumi.Output; /** * Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ readonly tagsAll: pulumi.Output<{ [key: string]: string; }>; /** * ID of the accepter VPC. */ readonly vpcId: pulumi.Output; /** * VPC Peering Connection ID to manage. */ readonly vpcPeeringConnectionId: pulumi.Output; /** * Create a VpcPeeringConnectionAccepter resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: VpcPeeringConnectionAccepterArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering VpcPeeringConnectionAccepter resources. */ export interface VpcPeeringConnectionAccepterState { /** * Status of the VPC Peering Connection request. */ acceptStatus?: pulumi.Input; /** * Configuration block for [VPC Peering Connection](https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html) options to set for the VPC that accepts the peering connection (a maximum of one). See `accepter` Block below. */ accepter?: pulumi.Input; /** * Whether or not to accept the peering request. Defaults to `false`. */ autoAccept?: pulumi.Input; /** * AWS account ID of the owner of the requester VPC. */ peerOwnerId?: pulumi.Input; /** * Region of the accepter VPC. */ peerRegion?: pulumi.Input; /** * ID of the requester VPC. */ peerVpcId?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Configuration block for [VPC Peering Connection](https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html) options to set for the VPC that requests the peering connection (a maximum of one). See `requester` Block below. */ requester?: pulumi.Input; /** * Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ tagsAll?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * ID of the accepter VPC. */ vpcId?: pulumi.Input; /** * VPC Peering Connection ID to manage. */ vpcPeeringConnectionId?: pulumi.Input; } /** * The set of arguments for constructing a VpcPeeringConnectionAccepter resource. */ export interface VpcPeeringConnectionAccepterArgs { /** * Configuration block for [VPC Peering Connection](https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html) options to set for the VPC that accepts the peering connection (a maximum of one). See `accepter` Block below. */ accepter?: pulumi.Input; /** * Whether or not to accept the peering request. Defaults to `false`. */ autoAccept?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Configuration block for [VPC Peering Connection](https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html) options to set for the VPC that requests the peering connection (a maximum of one). See `requester` Block below. */ requester?: pulumi.Input; /** * Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * VPC Peering Connection ID to manage. */ vpcPeeringConnectionId: pulumi.Input; } //# sourceMappingURL=vpcPeeringConnectionAccepter.d.ts.map