import * as pulumi from "@pulumi/pulumi"; /** * Creates an AWS or GCP VPC peering for an existing Redis Enterprise Cloud Active-Active Subscription, allowing access to your subscription databases as if they were on the same network. * * For AWS, peering should be accepted by the other side. * For GCP, the opposite peering request should be submitted. * * ## Example Usage * ### AWS * * The following example shows how an Active-Active subscription can be peered with an AWS VPC using the rediscloud and AWS providers. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * import * as rediscloud from "@rediscloud/pulumi-rediscloud"; * * const subscription_resource = new rediscloud.ActiveActiveSubscription("subscription-resource", {}); * // ... * const peering_resource = new rediscloud.ActiveActiveSubscriptionPeering("peering-resource", { * subscriptionId: subscription_resource.id, * sourceRegion: "us-east-1", * destinationRegion: "eu-west-2", * awsAccountId: "123456789012", * vpcId: "vpc-01234567890", * vpcCidr: "10.0.10.0/24", * }); * const aws_peering_resource = new aws.ec2.VpcPeeringConnectionAccepter("aws-peering-resource", { * vpcPeeringConnectionId: peering_resource.awsPeeringId, * autoAccept: true, * }); * ``` * ### GCP * * The following example shows how an Active-Active subscription can be peered with a GCP project network using the rediscloud and google providers. * The example HCL locates the network details and creates/accepts the vpc peering connection through the Google provider. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * import * as rediscloud from "@rediscloud/pulumi-rediscloud"; * * const subscription_resource = new rediscloud.ActiveActiveSubscription("subscription-resource", {}); * // ... * const network = gcp.compute.getNetwork({ * project: "my-gcp-project", * name: "my-gcp-vpc", * }); * const peering_resource = new rediscloud.ActiveActiveSubscriptionPeering("peering-resource", { * subscriptionId: subscription_resource.id, * sourceRegion: "us-central1", * providerName: "GCP", * gcpProjectId: network.then(network => network.project), * gcpNetworkName: network.then(network => network.name), * }); * const gcp_peering_resource = new gcp.compute.NetworkPeering("gcp-peering-resource", { * network: network.then(network => network.selfLink), * peerNetwork: pulumi.interpolate`https://www.googleapis.com/compute/v1/projects/${peering_resource.gcpRedisProjectId}/global/networks/${rediscloud_active_active_subscription_peering.example.gcp_redis_network_name}`, * }); * ``` * * ## Import * * `rediscloud_active_active_subscription_peering` can be imported using the ID of the Active-Active subscription and the ID of the peering connection, e.g. * * ```sh * $ pulumi import rediscloud:index/activeActiveSubscriptionPeering:ActiveActiveSubscriptionPeering peering-resource 12345678/1234 * ``` */ export declare class ActiveActiveSubscriptionPeering extends pulumi.CustomResource { /** * Get an existing ActiveActiveSubscriptionPeering 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?: ActiveActiveSubscriptionPeeringState, opts?: pulumi.CustomResourceOptions): ActiveActiveSubscriptionPeering; /** * Returns true if the given object is an instance of ActiveActiveSubscriptionPeering. 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 ActiveActiveSubscriptionPeering; /** * AWS account ID that the VPC to be peered lives in. **Modifying this attribute will force creation of a new resource.** */ readonly awsAccountId: pulumi.Output; /** * Identifier of the AWS cloud peering */ readonly awsPeeringId: pulumi.Output; /** * Name of the region to create the VPC peering to. **Modifying this attribute will force creation of a new resource.** */ readonly destinationRegion: pulumi.Output; /** * The name of the network to be peered. **Modifying this attribute will force creation of a new resource.** */ readonly gcpNetworkName: pulumi.Output; /** * Identifier of the cloud peering */ readonly gcpPeeringId: pulumi.Output; /** * GCP project ID that the VPC to be peered lives in. **Modifying this attribute will force creation of a new resource.** */ readonly gcpProjectId: pulumi.Output; /** * The name of the Redis Enterprise Cloud network to be peered */ readonly gcpRedisNetworkName: pulumi.Output; /** * Identifier of the Redis Enterprise Cloud GCP project to be peered */ readonly gcpRedisProjectId: pulumi.Output; /** * The cloud provider to use with the vpc peering, (either `AWS` or `GCP`). Default: ‘AWS’. **Modifying this attribute will force creation of a new resource.** */ readonly providerName: pulumi.Output; /** * Name of the region to create the VPC peering from. **Modifying this attribute will force creation of a new resource.** * * * **AWS ONLY:** */ readonly sourceRegion: pulumi.Output; /** * is set to the current status of the peering - `initiating-request`, `pending-acceptance`, `active`, `inactive` or `failed`. */ readonly status: pulumi.Output; /** * A valid Active-Active subscription predefined in the current account. **Modifying this attribute will force creation of a new resource.** */ readonly subscriptionId: pulumi.Output; /** * CIDR range of the VPC to be peered. Either this or `vpcCidrs` must be specified. **Modifying this attribute will force creation of a new resource.** */ readonly vpcCidr: pulumi.Output; /** * CIDR ranges of the VPC to be peered. Either this or `vpcCidr` must be specified. **Modifying this attribute will force creation of a new resource.** * * **GCP ONLY:** */ readonly vpcCidrs: pulumi.Output; /** * Identifier of the VPC to be peered. **Modifying this attribute will force creation of a new resource.** */ readonly vpcId: pulumi.Output; /** * Create a ActiveActiveSubscriptionPeering 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: ActiveActiveSubscriptionPeeringArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ActiveActiveSubscriptionPeering resources. */ export interface ActiveActiveSubscriptionPeeringState { /** * AWS account ID that the VPC to be peered lives in. **Modifying this attribute will force creation of a new resource.** */ awsAccountId?: pulumi.Input; /** * Identifier of the AWS cloud peering */ awsPeeringId?: pulumi.Input; /** * Name of the region to create the VPC peering to. **Modifying this attribute will force creation of a new resource.** */ destinationRegion?: pulumi.Input; /** * The name of the network to be peered. **Modifying this attribute will force creation of a new resource.** */ gcpNetworkName?: pulumi.Input; /** * Identifier of the cloud peering */ gcpPeeringId?: pulumi.Input; /** * GCP project ID that the VPC to be peered lives in. **Modifying this attribute will force creation of a new resource.** */ gcpProjectId?: pulumi.Input; /** * The name of the Redis Enterprise Cloud network to be peered */ gcpRedisNetworkName?: pulumi.Input; /** * Identifier of the Redis Enterprise Cloud GCP project to be peered */ gcpRedisProjectId?: pulumi.Input; /** * The cloud provider to use with the vpc peering, (either `AWS` or `GCP`). Default: ‘AWS’. **Modifying this attribute will force creation of a new resource.** */ providerName?: pulumi.Input; /** * Name of the region to create the VPC peering from. **Modifying this attribute will force creation of a new resource.** * * * **AWS ONLY:** */ sourceRegion?: pulumi.Input; /** * is set to the current status of the peering - `initiating-request`, `pending-acceptance`, `active`, `inactive` or `failed`. */ status?: pulumi.Input; /** * A valid Active-Active subscription predefined in the current account. **Modifying this attribute will force creation of a new resource.** */ subscriptionId?: pulumi.Input; /** * CIDR range of the VPC to be peered. Either this or `vpcCidrs` must be specified. **Modifying this attribute will force creation of a new resource.** */ vpcCidr?: pulumi.Input; /** * CIDR ranges of the VPC to be peered. Either this or `vpcCidr` must be specified. **Modifying this attribute will force creation of a new resource.** * * **GCP ONLY:** */ vpcCidrs?: pulumi.Input[]>; /** * Identifier of the VPC to be peered. **Modifying this attribute will force creation of a new resource.** */ vpcId?: pulumi.Input; } /** * The set of arguments for constructing a ActiveActiveSubscriptionPeering resource. */ export interface ActiveActiveSubscriptionPeeringArgs { /** * AWS account ID that the VPC to be peered lives in. **Modifying this attribute will force creation of a new resource.** */ awsAccountId?: pulumi.Input; /** * Name of the region to create the VPC peering to. **Modifying this attribute will force creation of a new resource.** */ destinationRegion?: pulumi.Input; /** * The name of the network to be peered. **Modifying this attribute will force creation of a new resource.** */ gcpNetworkName?: pulumi.Input; /** * GCP project ID that the VPC to be peered lives in. **Modifying this attribute will force creation of a new resource.** */ gcpProjectId?: pulumi.Input; /** * The cloud provider to use with the vpc peering, (either `AWS` or `GCP`). Default: ‘AWS’. **Modifying this attribute will force creation of a new resource.** */ providerName?: pulumi.Input; /** * Name of the region to create the VPC peering from. **Modifying this attribute will force creation of a new resource.** * * * **AWS ONLY:** */ sourceRegion?: pulumi.Input; /** * A valid Active-Active subscription predefined in the current account. **Modifying this attribute will force creation of a new resource.** */ subscriptionId: pulumi.Input; /** * CIDR range of the VPC to be peered. Either this or `vpcCidrs` must be specified. **Modifying this attribute will force creation of a new resource.** */ vpcCidr?: pulumi.Input; /** * CIDR ranges of the VPC to be peered. Either this or `vpcCidr` must be specified. **Modifying this attribute will force creation of a new resource.** * * **GCP ONLY:** */ vpcCidrs?: pulumi.Input[]>; /** * Identifier of the VPC to be peered. **Modifying this attribute will force creation of a new resource.** */ vpcId?: pulumi.Input; }