temporalcloud.ConnectivityRule
Explore with Pulumi AI
Provisions a Temporal Cloud Connectivity Rule.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as temporalcloud from "@pulumi/temporalcloud";
// Create Public Connectivity Rule
const publicRule = new temporalcloud.ConnectivityRule("publicRule", {connectivityType: "public"});
// Create Private Connectivity Rule for AWS
const privateAws = new temporalcloud.ConnectivityRule("privateAws", {
connectivityType: "private",
connectionId: "vpce-12345678",
region: "aws-us-west-2",
});
// Create Private Connectivity Rule for GCP
const privateGcp = new temporalcloud.ConnectivityRule("privateGcp", {
connectivityType: "private",
connectionId: "vpce-12345678",
region: "gcp-us-central1",
gcpProjectId: "my-gcp-project-id",
});
// Attaching connectivity rules to a namespace
const ns_with_cr = new temporalcloud.Namespace("ns-with-cr", {
regions: ["aws-us-west-2"],
apiKeyAuth: true,
retentionDays: 14,
connectivityRuleIds: [
public_rule.id,
private_aws.id,
],
});
import pulumi
import pulumi_temporalcloud as temporalcloud
# Create Public Connectivity Rule
public_rule = temporalcloud.ConnectivityRule("publicRule", connectivity_type="public")
# Create Private Connectivity Rule for AWS
private_aws = temporalcloud.ConnectivityRule("privateAws",
connectivity_type="private",
connection_id="vpce-12345678",
region="aws-us-west-2")
# Create Private Connectivity Rule for GCP
private_gcp = temporalcloud.ConnectivityRule("privateGcp",
connectivity_type="private",
connection_id="vpce-12345678",
region="gcp-us-central1",
gcp_project_id="my-gcp-project-id")
# Attaching connectivity rules to a namespace
ns_with_cr = temporalcloud.Namespace("ns-with-cr",
regions=["aws-us-west-2"],
api_key_auth=True,
retention_days=14,
connectivity_rule_ids=[
public_rule["id"],
private_aws["id"],
])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/temporalcloud/temporalcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create Public Connectivity Rule
_, err := temporalcloud.NewConnectivityRule(ctx, "publicRule", &temporalcloud.ConnectivityRuleArgs{
ConnectivityType: pulumi.String("public"),
})
if err != nil {
return err
}
// Create Private Connectivity Rule for AWS
_, err = temporalcloud.NewConnectivityRule(ctx, "privateAws", &temporalcloud.ConnectivityRuleArgs{
ConnectivityType: pulumi.String("private"),
ConnectionId: pulumi.String("vpce-12345678"),
Region: pulumi.String("aws-us-west-2"),
})
if err != nil {
return err
}
// Create Private Connectivity Rule for GCP
_, err = temporalcloud.NewConnectivityRule(ctx, "privateGcp", &temporalcloud.ConnectivityRuleArgs{
ConnectivityType: pulumi.String("private"),
ConnectionId: pulumi.String("vpce-12345678"),
Region: pulumi.String("gcp-us-central1"),
GcpProjectId: pulumi.String("my-gcp-project-id"),
})
if err != nil {
return err
}
// Attaching connectivity rules to a namespace
_, err = temporalcloud.NewNamespace(ctx, "ns-with-cr", &temporalcloud.NamespaceArgs{
Regions: pulumi.StringArray{
pulumi.String("aws-us-west-2"),
},
ApiKeyAuth: pulumi.Bool(true),
RetentionDays: pulumi.Float64(14),
ConnectivityRuleIds: pulumi.StringArray{
public_rule.Id,
private_aws.Id,
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Temporalcloud = Pulumi.Temporalcloud;
return await Deployment.RunAsync(() =>
{
// Create Public Connectivity Rule
var publicRule = new Temporalcloud.ConnectivityRule("publicRule", new()
{
ConnectivityType = "public",
});
// Create Private Connectivity Rule for AWS
var privateAws = new Temporalcloud.ConnectivityRule("privateAws", new()
{
ConnectivityType = "private",
ConnectionId = "vpce-12345678",
Region = "aws-us-west-2",
});
// Create Private Connectivity Rule for GCP
var privateGcp = new Temporalcloud.ConnectivityRule("privateGcp", new()
{
ConnectivityType = "private",
ConnectionId = "vpce-12345678",
Region = "gcp-us-central1",
GcpProjectId = "my-gcp-project-id",
});
// Attaching connectivity rules to a namespace
var ns_with_cr = new Temporalcloud.Namespace("ns-with-cr", new()
{
Regions = new[]
{
"aws-us-west-2",
},
ApiKeyAuth = true,
RetentionDays = 14,
ConnectivityRuleIds = new[]
{
public_rule.Id,
private_aws.Id,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.temporalcloud.ConnectivityRule;
import com.pulumi.temporalcloud.ConnectivityRuleArgs;
import com.pulumi.temporalcloud.Namespace;
import com.pulumi.temporalcloud.NamespaceArgs;
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) {
// Create Public Connectivity Rule
var publicRule = new ConnectivityRule("publicRule", ConnectivityRuleArgs.builder()
.connectivityType("public")
.build());
// Create Private Connectivity Rule for AWS
var privateAws = new ConnectivityRule("privateAws", ConnectivityRuleArgs.builder()
.connectivityType("private")
.connectionId("vpce-12345678")
.region("aws-us-west-2")
.build());
// Create Private Connectivity Rule for GCP
var privateGcp = new ConnectivityRule("privateGcp", ConnectivityRuleArgs.builder()
.connectivityType("private")
.connectionId("vpce-12345678")
.region("gcp-us-central1")
.gcpProjectId("my-gcp-project-id")
.build());
// Attaching connectivity rules to a namespace
var ns_with_cr = new Namespace("ns-with-cr", NamespaceArgs.builder()
.regions("aws-us-west-2")
.apiKeyAuth(true)
.retentionDays(14)
.connectivityRuleIds(
public_rule.id(),
private_aws.id())
.build());
}
}
resources:
# Create Public Connectivity Rule
publicRule:
type: temporalcloud:ConnectivityRule
properties:
connectivityType: public
# Create Private Connectivity Rule for AWS
privateAws:
type: temporalcloud:ConnectivityRule
properties:
connectivityType: private
connectionId: vpce-12345678
region: aws-us-west-2
# Create Private Connectivity Rule for GCP
privateGcp:
type: temporalcloud:ConnectivityRule
properties:
connectivityType: private
connectionId: vpce-12345678
region: gcp-us-central1
gcpProjectId: my-gcp-project-id
# Attaching connectivity rules to a namespace
ns-with-cr:
type: temporalcloud:Namespace
properties:
regions:
- aws-us-west-2
apiKeyAuth: true
retentionDays: 14
connectivityRuleIds:
- ${public_rule.id}
- ${private_aws.id}
Create ConnectivityRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ConnectivityRule(name: string, args: ConnectivityRuleArgs, opts?: CustomResourceOptions);
@overload
def ConnectivityRule(resource_name: str,
args: ConnectivityRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ConnectivityRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
connectivity_type: Optional[str] = None,
connection_id: Optional[str] = None,
gcp_project_id: Optional[str] = None,
region: Optional[str] = None,
timeouts: Optional[ConnectivityRuleTimeoutsArgs] = None)
func NewConnectivityRule(ctx *Context, name string, args ConnectivityRuleArgs, opts ...ResourceOption) (*ConnectivityRule, error)
public ConnectivityRule(string name, ConnectivityRuleArgs args, CustomResourceOptions? opts = null)
public ConnectivityRule(String name, ConnectivityRuleArgs args)
public ConnectivityRule(String name, ConnectivityRuleArgs args, CustomResourceOptions options)
type: temporalcloud:ConnectivityRule
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 ConnectivityRuleArgs
- 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 ConnectivityRuleArgs
- 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 ConnectivityRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ConnectivityRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ConnectivityRuleArgs
- 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 connectivityRuleResource = new Temporalcloud.ConnectivityRule("connectivityRuleResource", new()
{
ConnectivityType = "string",
ConnectionId = "string",
GcpProjectId = "string",
Region = "string",
Timeouts = new Temporalcloud.Inputs.ConnectivityRuleTimeoutsArgs
{
Create = "string",
Delete = "string",
},
});
example, err := temporalcloud.NewConnectivityRule(ctx, "connectivityRuleResource", &temporalcloud.ConnectivityRuleArgs{
ConnectivityType: pulumi.String("string"),
ConnectionId: pulumi.String("string"),
GcpProjectId: pulumi.String("string"),
Region: pulumi.String("string"),
Timeouts: &temporalcloud.ConnectivityRuleTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
},
})
var connectivityRuleResource = new ConnectivityRule("connectivityRuleResource", ConnectivityRuleArgs.builder()
.connectivityType("string")
.connectionId("string")
.gcpProjectId("string")
.region("string")
.timeouts(ConnectivityRuleTimeoutsArgs.builder()
.create("string")
.delete("string")
.build())
.build());
connectivity_rule_resource = temporalcloud.ConnectivityRule("connectivityRuleResource",
connectivity_type="string",
connection_id="string",
gcp_project_id="string",
region="string",
timeouts={
"create": "string",
"delete": "string",
})
const connectivityRuleResource = new temporalcloud.ConnectivityRule("connectivityRuleResource", {
connectivityType: "string",
connectionId: "string",
gcpProjectId: "string",
region: "string",
timeouts: {
create: "string",
"delete": "string",
},
});
type: temporalcloud:ConnectivityRule
properties:
connectionId: string
connectivityType: string
gcpProjectId: string
region: string
timeouts:
create: string
delete: string
ConnectivityRule 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 ConnectivityRule resource accepts the following input properties:
- Connectivity
Type string - The type of connectivity. Must be one of 'public' or 'private'.
- Connection
Id string - The connection ID of the private connection.
- Gcp
Project stringId - The GCP project ID. Required when cloud_provider is 'gcp'.
- Region string
- The region of the connection. Example: 'aws-us-west-2'.
- Timeouts
Connectivity
Rule Timeouts
- Connectivity
Type string - The type of connectivity. Must be one of 'public' or 'private'.
- Connection
Id string - The connection ID of the private connection.
- Gcp
Project stringId - The GCP project ID. Required when cloud_provider is 'gcp'.
- Region string
- The region of the connection. Example: 'aws-us-west-2'.
- Timeouts
Connectivity
Rule Timeouts Args
- connectivity
Type String - The type of connectivity. Must be one of 'public' or 'private'.
- connection
Id String - The connection ID of the private connection.
- gcp
Project StringId - The GCP project ID. Required when cloud_provider is 'gcp'.
- region String
- The region of the connection. Example: 'aws-us-west-2'.
- timeouts
Connectivity
Rule Timeouts
- connectivity
Type string - The type of connectivity. Must be one of 'public' or 'private'.
- connection
Id string - The connection ID of the private connection.
- gcp
Project stringId - The GCP project ID. Required when cloud_provider is 'gcp'.
- region string
- The region of the connection. Example: 'aws-us-west-2'.
- timeouts
Connectivity
Rule Timeouts
- connectivity_
type str - The type of connectivity. Must be one of 'public' or 'private'.
- connection_
id str - The connection ID of the private connection.
- gcp_
project_ strid - The GCP project ID. Required when cloud_provider is 'gcp'.
- region str
- The region of the connection. Example: 'aws-us-west-2'.
- timeouts
Connectivity
Rule Timeouts Args
- connectivity
Type String - The type of connectivity. Must be one of 'public' or 'private'.
- connection
Id String - The connection ID of the private connection.
- gcp
Project StringId - The GCP project ID. Required when cloud_provider is 'gcp'.
- region String
- The region of the connection. Example: 'aws-us-west-2'.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the ConnectivityRule resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ConnectivityRule Resource
Get an existing ConnectivityRule 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?: ConnectivityRuleState, opts?: CustomResourceOptions): ConnectivityRule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
connection_id: Optional[str] = None,
connectivity_type: Optional[str] = None,
gcp_project_id: Optional[str] = None,
region: Optional[str] = None,
timeouts: Optional[ConnectivityRuleTimeoutsArgs] = None) -> ConnectivityRule
func GetConnectivityRule(ctx *Context, name string, id IDInput, state *ConnectivityRuleState, opts ...ResourceOption) (*ConnectivityRule, error)
public static ConnectivityRule Get(string name, Input<string> id, ConnectivityRuleState? state, CustomResourceOptions? opts = null)
public static ConnectivityRule get(String name, Output<String> id, ConnectivityRuleState state, CustomResourceOptions options)
resources: _: type: temporalcloud:ConnectivityRule get: id: ${id}
- 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.
- Connection
Id string - The connection ID of the private connection.
- Connectivity
Type string - The type of connectivity. Must be one of 'public' or 'private'.
- Gcp
Project stringId - The GCP project ID. Required when cloud_provider is 'gcp'.
- Region string
- The region of the connection. Example: 'aws-us-west-2'.
- Timeouts
Connectivity
Rule Timeouts
- Connection
Id string - The connection ID of the private connection.
- Connectivity
Type string - The type of connectivity. Must be one of 'public' or 'private'.
- Gcp
Project stringId - The GCP project ID. Required when cloud_provider is 'gcp'.
- Region string
- The region of the connection. Example: 'aws-us-west-2'.
- Timeouts
Connectivity
Rule Timeouts Args
- connection
Id String - The connection ID of the private connection.
- connectivity
Type String - The type of connectivity. Must be one of 'public' or 'private'.
- gcp
Project StringId - The GCP project ID. Required when cloud_provider is 'gcp'.
- region String
- The region of the connection. Example: 'aws-us-west-2'.
- timeouts
Connectivity
Rule Timeouts
- connection
Id string - The connection ID of the private connection.
- connectivity
Type string - The type of connectivity. Must be one of 'public' or 'private'.
- gcp
Project stringId - The GCP project ID. Required when cloud_provider is 'gcp'.
- region string
- The region of the connection. Example: 'aws-us-west-2'.
- timeouts
Connectivity
Rule Timeouts
- connection_
id str - The connection ID of the private connection.
- connectivity_
type str - The type of connectivity. Must be one of 'public' or 'private'.
- gcp_
project_ strid - The GCP project ID. Required when cloud_provider is 'gcp'.
- region str
- The region of the connection. Example: 'aws-us-west-2'.
- timeouts
Connectivity
Rule Timeouts Args
- connection
Id String - The connection ID of the private connection.
- connectivity
Type String - The type of connectivity. Must be one of 'public' or 'private'.
- gcp
Project StringId - The GCP project ID. Required when cloud_provider is 'gcp'.
- region String
- The region of the connection. Example: 'aws-us-west-2'.
- timeouts Property Map
Supporting Types
ConnectivityRuleTimeouts, ConnectivityRuleTimeoutsArgs
- Create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- Create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- create String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- create str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- create String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
Package Details
- Repository
- temporalcloud temporalio/terraform-provider-temporalcloud
- License
- Notes
- This Pulumi package is based on the
temporalcloud
Terraform Provider.