eventstorecloud.Peering
Explore with Pulumi AI
Manages peering connections between Event Store Cloud VPCs and customer own VPCs
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using EventStoreCloud = Pulumi.EventStoreCloud;
return await Deployment.RunAsync(() =>
{
// Example for AWS
var exampleProject = new EventStoreCloud.Project("exampleProject");
var exampleNetwork = new EventStoreCloud.Network("exampleNetwork", new()
{
ProjectId = exampleProject.Id,
ResourceProvider = "aws",
Region = "us-west-2",
CidrBlock = "172.21.0.0/16",
});
var examplePeering = new EventStoreCloud.Peering("examplePeering", new()
{
ProjectId = exampleNetwork.ProjectId,
NetworkId = exampleNetwork.Id,
PeerResourceProvider = exampleNetwork.ResourceProvider,
PeerNetworkRegion = exampleNetwork.Region,
PeerAccountId = "<Customer AWS Account ID>",
PeerNetworkId = "<Customer VPC ID>",
Routes = new[]
{
"<Address space of the customer VPC>",
},
});
});
package main
import (
"github.com/EventStore/pulumi-eventstorecloud/sdk/go/eventstorecloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleProject, err := eventstorecloud.NewProject(ctx, "exampleProject", nil)
if err != nil {
return err
}
exampleNetwork, err := eventstorecloud.NewNetwork(ctx, "exampleNetwork", &eventstorecloud.NetworkArgs{
ProjectId: exampleProject.ID(),
ResourceProvider: pulumi.String("aws"),
Region: pulumi.String("us-west-2"),
CidrBlock: pulumi.String("172.21.0.0/16"),
})
if err != nil {
return err
}
_, err = eventstorecloud.NewPeering(ctx, "examplePeering", &eventstorecloud.PeeringArgs{
ProjectId: exampleNetwork.ProjectId,
NetworkId: exampleNetwork.ID(),
PeerResourceProvider: exampleNetwork.ResourceProvider,
PeerNetworkRegion: exampleNetwork.Region,
PeerAccountId: pulumi.String("<Customer AWS Account ID>"),
PeerNetworkId: pulumi.String("<Customer VPC ID>"),
Routes: pulumi.StringArray{
pulumi.String("<Address space of the customer VPC>"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.eventstorecloud.Project;
import com.pulumi.eventstorecloud.Network;
import com.pulumi.eventstorecloud.NetworkArgs;
import com.pulumi.eventstorecloud.Peering;
import com.pulumi.eventstorecloud.PeeringArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleProject = new Project("exampleProject");
var exampleNetwork = new Network("exampleNetwork", NetworkArgs.builder()
.projectId(exampleProject.id())
.resourceProvider("aws")
.region("us-west-2")
.cidrBlock("172.21.0.0/16")
.build());
var examplePeering = new Peering("examplePeering", PeeringArgs.builder()
.projectId(exampleNetwork.projectId())
.networkId(exampleNetwork.id())
.peerResourceProvider(exampleNetwork.resourceProvider())
.peerNetworkRegion(exampleNetwork.region())
.peerAccountId("<Customer AWS Account ID>")
.peerNetworkId("<Customer VPC ID>")
.routes("<Address space of the customer VPC>")
.build());
}
}
import pulumi
import pulumi_eventstorecloud as eventstorecloud
# Example for AWS
example_project = eventstorecloud.Project("exampleProject")
example_network = eventstorecloud.Network("exampleNetwork",
project_id=example_project.id,
resource_provider="aws",
region="us-west-2",
cidr_block="172.21.0.0/16")
example_peering = eventstorecloud.Peering("examplePeering",
project_id=example_network.project_id,
network_id=example_network.id,
peer_resource_provider=example_network.resource_provider,
peer_network_region=example_network.region,
peer_account_id="<Customer AWS Account ID>",
peer_network_id="<Customer VPC ID>",
routes=["<Address space of the customer VPC>"])
import * as pulumi from "@pulumi/pulumi";
import * as eventstorecloud from "@eventstore/pulumi-eventstorecloud";
// Example for AWS
const exampleProject = new eventstorecloud.Project("exampleProject", {});
const exampleNetwork = new eventstorecloud.Network("exampleNetwork", {
projectId: exampleProject.id,
resourceProvider: "aws",
region: "us-west-2",
cidrBlock: "172.21.0.0/16",
});
const examplePeering = new eventstorecloud.Peering("examplePeering", {
projectId: exampleNetwork.projectId,
networkId: exampleNetwork.id,
peerResourceProvider: exampleNetwork.resourceProvider,
peerNetworkRegion: exampleNetwork.region,
peerAccountId: "<Customer AWS Account ID>",
peerNetworkId: "<Customer VPC ID>",
routes: ["<Address space of the customer VPC>"],
});
resources:
# Example for AWS
exampleProject:
type: eventstorecloud:Project
exampleNetwork:
type: eventstorecloud:Network
properties:
projectId: ${exampleProject.id}
resourceProvider: aws
region: us-west-2
cidrBlock: 172.21.0.0/16
examplePeering:
type: eventstorecloud:Peering
properties:
projectId: ${exampleNetwork.projectId}
networkId: ${exampleNetwork.id}
peerResourceProvider: ${exampleNetwork.resourceProvider}
peerNetworkRegion: ${exampleNetwork.region}
peerAccountId: <Customer AWS Account ID>
peerNetworkId: <Customer VPC ID>
routes:
- <Address space of the customer VPC>
Create Peering Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Peering(name: string, args: PeeringArgs, opts?: CustomResourceOptions);
@overload
def Peering(resource_name: str,
args: PeeringArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Peering(resource_name: str,
opts: Optional[ResourceOptions] = None,
network_id: Optional[str] = None,
peer_account_id: Optional[str] = None,
peer_network_id: Optional[str] = None,
peer_network_region: Optional[str] = None,
peer_resource_provider: Optional[str] = None,
project_id: Optional[str] = None,
routes: Optional[Sequence[str]] = None,
name: Optional[str] = None)
func NewPeering(ctx *Context, name string, args PeeringArgs, opts ...ResourceOption) (*Peering, error)
public Peering(string name, PeeringArgs args, CustomResourceOptions? opts = null)
public Peering(String name, PeeringArgs args)
public Peering(String name, PeeringArgs args, CustomResourceOptions options)
type: eventstorecloud:Peering
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args PeeringArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args PeeringArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args PeeringArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PeeringArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PeeringArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var peeringResource = new EventStoreCloud.Peering("peeringResource", new()
{
NetworkId = "string",
PeerAccountId = "string",
PeerNetworkId = "string",
PeerNetworkRegion = "string",
PeerResourceProvider = "string",
ProjectId = "string",
Routes = new[]
{
"string",
},
Name = "string",
});
example, err := eventstorecloud.NewPeering(ctx, "peeringResource", &eventstorecloud.PeeringArgs{
NetworkId: pulumi.String("string"),
PeerAccountId: pulumi.String("string"),
PeerNetworkId: pulumi.String("string"),
PeerNetworkRegion: pulumi.String("string"),
PeerResourceProvider: pulumi.String("string"),
ProjectId: pulumi.String("string"),
Routes: pulumi.StringArray{
pulumi.String("string"),
},
Name: pulumi.String("string"),
})
var peeringResource = new Peering("peeringResource", PeeringArgs.builder()
.networkId("string")
.peerAccountId("string")
.peerNetworkId("string")
.peerNetworkRegion("string")
.peerResourceProvider("string")
.projectId("string")
.routes("string")
.name("string")
.build());
peering_resource = eventstorecloud.Peering("peeringResource",
network_id="string",
peer_account_id="string",
peer_network_id="string",
peer_network_region="string",
peer_resource_provider="string",
project_id="string",
routes=["string"],
name="string")
const peeringResource = new eventstorecloud.Peering("peeringResource", {
networkId: "string",
peerAccountId: "string",
peerNetworkId: "string",
peerNetworkRegion: "string",
peerResourceProvider: "string",
projectId: "string",
routes: ["string"],
name: "string",
});
type: eventstorecloud:Peering
properties:
name: string
networkId: string
peerAccountId: string
peerNetworkId: string
peerNetworkRegion: string
peerResourceProvider: string
projectId: string
routes:
- string
Peering Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Peering resource accepts the following input properties:
- Network
Id string - Network ID
- Peer
Account stringId - Account identifier in which to the peer network exists
- Peer
Network stringId - Network identifier of the peer network exists
- Peer
Network stringRegion - Provider region in which to the peer network exists
- Peer
Resource stringProvider - Cloud Provider in which the target network exists
- Project
Id string - Project ID
- Routes List<string>
- Routes to create from the Event Store network to the peer network
- Name string
- Human-friendly name for the network
- Network
Id string - Network ID
- Peer
Account stringId - Account identifier in which to the peer network exists
- Peer
Network stringId - Network identifier of the peer network exists
- Peer
Network stringRegion - Provider region in which to the peer network exists
- Peer
Resource stringProvider - Cloud Provider in which the target network exists
- Project
Id string - Project ID
- Routes []string
- Routes to create from the Event Store network to the peer network
- Name string
- Human-friendly name for the network
- network
Id String - Network ID
- peer
Account StringId - Account identifier in which to the peer network exists
- peer
Network StringId - Network identifier of the peer network exists
- peer
Network StringRegion - Provider region in which to the peer network exists
- peer
Resource StringProvider - Cloud Provider in which the target network exists
- project
Id String - Project ID
- routes List<String>
- Routes to create from the Event Store network to the peer network
- name String
- Human-friendly name for the network
- network
Id string - Network ID
- peer
Account stringId - Account identifier in which to the peer network exists
- peer
Network stringId - Network identifier of the peer network exists
- peer
Network stringRegion - Provider region in which to the peer network exists
- peer
Resource stringProvider - Cloud Provider in which the target network exists
- project
Id string - Project ID
- routes string[]
- Routes to create from the Event Store network to the peer network
- name string
- Human-friendly name for the network
- network_
id str - Network ID
- peer_
account_ strid - Account identifier in which to the peer network exists
- peer_
network_ strid - Network identifier of the peer network exists
- peer_
network_ strregion - Provider region in which to the peer network exists
- peer_
resource_ strprovider - Cloud Provider in which the target network exists
- project_
id str - Project ID
- routes Sequence[str]
- Routes to create from the Event Store network to the peer network
- name str
- Human-friendly name for the network
- network
Id String - Network ID
- peer
Account StringId - Account identifier in which to the peer network exists
- peer
Network StringId - Network identifier of the peer network exists
- peer
Network StringRegion - Provider region in which to the peer network exists
- peer
Resource StringProvider - Cloud Provider in which the target network exists
- project
Id String - Project ID
- routes List<String>
- Routes to create from the Event Store network to the peer network
- name String
- Human-friendly name for the network
Outputs
All input properties are implicitly available as output properties. Additionally, the Peering resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Provider
Metadata Dictionary<string, string> - Metadata about the remote end of the peering connection
- Id string
- The provider-assigned unique ID for this managed resource.
- Provider
Metadata map[string]string - Metadata about the remote end of the peering connection
- id String
- The provider-assigned unique ID for this managed resource.
- provider
Metadata Map<String,String> - Metadata about the remote end of the peering connection
- id string
- The provider-assigned unique ID for this managed resource.
- provider
Metadata {[key: string]: string} - Metadata about the remote end of the peering connection
- id str
- The provider-assigned unique ID for this managed resource.
- provider_
metadata Mapping[str, str] - Metadata about the remote end of the peering connection
- id String
- The provider-assigned unique ID for this managed resource.
- provider
Metadata Map<String> - Metadata about the remote end of the peering connection
Look up Existing Peering Resource
Get an existing Peering resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: PeeringState, opts?: CustomResourceOptions): Peering
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
network_id: Optional[str] = None,
peer_account_id: Optional[str] = None,
peer_network_id: Optional[str] = None,
peer_network_region: Optional[str] = None,
peer_resource_provider: Optional[str] = None,
project_id: Optional[str] = None,
provider_metadata: Optional[Mapping[str, str]] = None,
routes: Optional[Sequence[str]] = None) -> Peering
func GetPeering(ctx *Context, name string, id IDInput, state *PeeringState, opts ...ResourceOption) (*Peering, error)
public static Peering Get(string name, Input<string> id, PeeringState? state, CustomResourceOptions? opts = null)
public static Peering get(String name, Output<String> id, PeeringState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Name string
- Human-friendly name for the network
- Network
Id string - Network ID
- Peer
Account stringId - Account identifier in which to the peer network exists
- Peer
Network stringId - Network identifier of the peer network exists
- Peer
Network stringRegion - Provider region in which to the peer network exists
- Peer
Resource stringProvider - Cloud Provider in which the target network exists
- Project
Id string - Project ID
- Provider
Metadata Dictionary<string, string> - Metadata about the remote end of the peering connection
- Routes List<string>
- Routes to create from the Event Store network to the peer network
- Name string
- Human-friendly name for the network
- Network
Id string - Network ID
- Peer
Account stringId - Account identifier in which to the peer network exists
- Peer
Network stringId - Network identifier of the peer network exists
- Peer
Network stringRegion - Provider region in which to the peer network exists
- Peer
Resource stringProvider - Cloud Provider in which the target network exists
- Project
Id string - Project ID
- Provider
Metadata map[string]string - Metadata about the remote end of the peering connection
- Routes []string
- Routes to create from the Event Store network to the peer network
- name String
- Human-friendly name for the network
- network
Id String - Network ID
- peer
Account StringId - Account identifier in which to the peer network exists
- peer
Network StringId - Network identifier of the peer network exists
- peer
Network StringRegion - Provider region in which to the peer network exists
- peer
Resource StringProvider - Cloud Provider in which the target network exists
- project
Id String - Project ID
- provider
Metadata Map<String,String> - Metadata about the remote end of the peering connection
- routes List<String>
- Routes to create from the Event Store network to the peer network
- name string
- Human-friendly name for the network
- network
Id string - Network ID
- peer
Account stringId - Account identifier in which to the peer network exists
- peer
Network stringId - Network identifier of the peer network exists
- peer
Network stringRegion - Provider region in which to the peer network exists
- peer
Resource stringProvider - Cloud Provider in which the target network exists
- project
Id string - Project ID
- provider
Metadata {[key: string]: string} - Metadata about the remote end of the peering connection
- routes string[]
- Routes to create from the Event Store network to the peer network
- name str
- Human-friendly name for the network
- network_
id str - Network ID
- peer_
account_ strid - Account identifier in which to the peer network exists
- peer_
network_ strid - Network identifier of the peer network exists
- peer_
network_ strregion - Provider region in which to the peer network exists
- peer_
resource_ strprovider - Cloud Provider in which the target network exists
- project_
id str - Project ID
- provider_
metadata Mapping[str, str] - Metadata about the remote end of the peering connection
- routes Sequence[str]
- Routes to create from the Event Store network to the peer network
- name String
- Human-friendly name for the network
- network
Id String - Network ID
- peer
Account StringId - Account identifier in which to the peer network exists
- peer
Network StringId - Network identifier of the peer network exists
- peer
Network StringRegion - Provider region in which to the peer network exists
- peer
Resource StringProvider - Cloud Provider in which the target network exists
- project
Id String - Project ID
- provider
Metadata Map<String> - Metadata about the remote end of the peering connection
- routes List<String>
- Routes to create from the Event Store network to the peer network
Import
$ pulumi import eventstorecloud:index/peering:Peering example project_id:peering_id
~> Keep in mind that additional operations might be required to activate the peering link. Check our provisioning guidelines for each of the supported cloud providers to know more.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- eventstorecloud EventStore/pulumi-eventstorecloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
eventstorecloud
Terraform Provider.