import * as pulumi from "@pulumi/pulumi"; /** * Creates an AWS or GCP VPC peering for an existing Redis Enterprise Cloud 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 a subscription can be peered with a AWS VPC using the rediscloud and google providers. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * import * as rediscloud from "@rediscloud/pulumi-rediscloud"; * * const exampleSubscription = new rediscloud.Subscription("exampleSubscription", {}); * // ... * const exampleSubscriptionPeering = new rediscloud.SubscriptionPeering("exampleSubscriptionPeering", { * subscriptionId: exampleSubscription.id, * region: "eu-west-1", * awsAccountId: "123456789012", * vpcId: "vpc-01234567890", * vpcCidr: "10.0.0.0/8", * }); * const example_peering = new aws.ec2.VpcPeeringConnectionAccepter("example-peering", { * vpcPeeringConnectionId: exampleSubscriptionPeering.awsPeeringId, * autoAccept: true, * }); * ``` * ### GCP * * The following example shows how a 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 example = new rediscloud.Subscription("example", {}); * // ... * const network = gcp.compute.getNetwork({ * project: "my-gcp-project", * name: "my-gcp-vpc", * }); * const example_peeringSubscriptionPeering = new rediscloud.SubscriptionPeering("example-peeringSubscriptionPeering", { * subscriptionId: example.id, * providerName: "GCP", * gcpProjectId: network.then(network => network.project), * gcpNetworkName: network.then(network => network.name), * }); * const example_peeringNetworkPeering = new gcp.compute.NetworkPeering("example-peeringNetworkPeering", { * network: network.then(network => network.selfLink), * peerNetwork: `https://www.googleapis.com/compute/v1/projects/${rediscloud_subscription_peering.example.gcp_redis_project_id}/global/networks/${rediscloud_subscription_peering.example.gcp_redis_network_name}`, * }); * ``` * * ## Import * * `rediscloud_subscription_peering` can be imported using the ID of the subscription and the ID of the peering connection, e.g. * * ```sh * $ pulumi import rediscloud:index/subscriptionPeering:SubscriptionPeering example 12345678/1234 * ``` */ export declare class SubscriptionPeering extends pulumi.CustomResource { /** * Get an existing SubscriptionPeering 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?: SubscriptionPeeringState, opts?: pulumi.CustomResourceOptions): SubscriptionPeering; /** * Returns true if the given object is an instance of SubscriptionPeering. 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 SubscriptionPeering; /** * 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; /** * 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; /** * AWS Region that the VPC to be peered lives in. **Modifying this attribute will force creation of a new resource.** */ readonly region: 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 subscription predefined in the current account. **Modifying this attribute will force creation of a new resource.** * * **AWS ONLY:** */ 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 SubscriptionPeering 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: SubscriptionPeeringArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering SubscriptionPeering resources. */ export interface SubscriptionPeeringState { /** * 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; /** * 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; /** * AWS Region that the VPC to be peered lives in. **Modifying this attribute will force creation of a new resource.** */ region?: pulumi.Input; /** * is set to the current status of the peering - `initiating-request`, `pending-acceptance`, `active`, `inactive` or `failed`. */ status?: pulumi.Input; /** * A valid subscription predefined in the current account. **Modifying this attribute will force creation of a new resource.** * * **AWS ONLY:** */ 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 SubscriptionPeering resource. */ export interface SubscriptionPeeringArgs { /** * AWS account ID that the VPC to be peered lives in. **Modifying this attribute will force creation of a new resource.** */ awsAccountId?: 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; /** * AWS Region that the VPC to be peered lives in. **Modifying this attribute will force creation of a new resource.** */ region?: pulumi.Input; /** * A valid subscription predefined in the current account. **Modifying this attribute will force creation of a new resource.** * * **AWS ONLY:** */ 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; }