1. Packages
  2. Control Plane (cpln)
  3. API Docs
  4. DomainRoute
Control Plane v0.0.56 published on Wednesday, Apr 9, 2025 by pulumiverse

cpln.DomainRoute

Explore with Pulumi AI

Create DomainRoute Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new DomainRoute(name: string, args: DomainRouteArgs, opts?: CustomResourceOptions);
@overload
def DomainRoute(resource_name: str,
                args: DomainRouteArgs,
                opts: Optional[ResourceOptions] = None)

@overload
def DomainRoute(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                domain_link: Optional[str] = None,
                workload_link: Optional[str] = None,
                domain_port: Optional[int] = None,
                headers: Optional[DomainRouteHeadersArgs] = None,
                host_prefix: Optional[str] = None,
                port: Optional[int] = None,
                prefix: Optional[str] = None,
                regex: Optional[str] = None,
                replace_prefix: Optional[str] = None)
func NewDomainRoute(ctx *Context, name string, args DomainRouteArgs, opts ...ResourceOption) (*DomainRoute, error)
public DomainRoute(string name, DomainRouteArgs args, CustomResourceOptions? opts = null)
public DomainRoute(String name, DomainRouteArgs args)
public DomainRoute(String name, DomainRouteArgs args, CustomResourceOptions options)
type: cpln:DomainRoute
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. DomainRouteArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. DomainRouteArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. DomainRouteArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. DomainRouteArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. DomainRouteArgs
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 domainRouteResource = new Cpln.DomainRoute("domainRouteResource", new()
{
    DomainLink = "string",
    WorkloadLink = "string",
    DomainPort = 0,
    Headers = new Cpln.Inputs.DomainRouteHeadersArgs
    {
        PlaceholderAttribute = false,
        Request = new Cpln.Inputs.DomainRouteHeadersRequestArgs
        {
            PlaceholderAttribute = false,
            Set = 
            {
                { "string", "string" },
            },
        },
    },
    HostPrefix = "string",
    Port = 0,
    Prefix = "string",
    Regex = "string",
    ReplacePrefix = "string",
});
Copy
example, err := cpln.NewDomainRoute(ctx, "domainRouteResource", &cpln.DomainRouteArgs{
	DomainLink:   pulumi.String("string"),
	WorkloadLink: pulumi.String("string"),
	DomainPort:   pulumi.Int(0),
	Headers: &cpln.DomainRouteHeadersArgs{
		PlaceholderAttribute: pulumi.Bool(false),
		Request: &cpln.DomainRouteHeadersRequestArgs{
			PlaceholderAttribute: pulumi.Bool(false),
			Set: pulumi.StringMap{
				"string": pulumi.String("string"),
			},
		},
	},
	HostPrefix:    pulumi.String("string"),
	Port:          pulumi.Int(0),
	Prefix:        pulumi.String("string"),
	Regex:         pulumi.String("string"),
	ReplacePrefix: pulumi.String("string"),
})
Copy
var domainRouteResource = new DomainRoute("domainRouteResource", DomainRouteArgs.builder()
    .domainLink("string")
    .workloadLink("string")
    .domainPort(0)
    .headers(DomainRouteHeadersArgs.builder()
        .placeholderAttribute(false)
        .request(DomainRouteHeadersRequestArgs.builder()
            .placeholderAttribute(false)
            .set(Map.of("string", "string"))
            .build())
        .build())
    .hostPrefix("string")
    .port(0)
    .prefix("string")
    .regex("string")
    .replacePrefix("string")
    .build());
Copy
domain_route_resource = cpln.DomainRoute("domainRouteResource",
    domain_link="string",
    workload_link="string",
    domain_port=0,
    headers={
        "placeholder_attribute": False,
        "request": {
            "placeholder_attribute": False,
            "set": {
                "string": "string",
            },
        },
    },
    host_prefix="string",
    port=0,
    prefix="string",
    regex="string",
    replace_prefix="string")
Copy
const domainRouteResource = new cpln.DomainRoute("domainRouteResource", {
    domainLink: "string",
    workloadLink: "string",
    domainPort: 0,
    headers: {
        placeholderAttribute: false,
        request: {
            placeholderAttribute: false,
            set: {
                string: "string",
            },
        },
    },
    hostPrefix: "string",
    port: 0,
    prefix: "string",
    regex: "string",
    replacePrefix: "string",
});
Copy
type: cpln:DomainRoute
properties:
    domainLink: string
    domainPort: 0
    headers:
        placeholderAttribute: false
        request:
            placeholderAttribute: false
            set:
                string: string
    hostPrefix: string
    port: 0
    prefix: string
    regex: string
    replacePrefix: string
    workloadLink: string
Copy

DomainRoute 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 DomainRoute resource accepts the following input properties:

DomainLink
This property is required.
Changes to this property will trigger replacement.
string
The self link of the domain to add the route to.
WorkloadLink This property is required. string
The link of the workload to map the prefix to.
DomainPort Changes to this property will trigger replacement. int
The port the route corresponds to. Default: 443
Headers Pulumiverse.Cpln.Inputs.DomainRouteHeaders
Modify the headers for all http requests for this route.
HostPrefix string
This option allows forwarding traffic for different host headers to different workloads. This will only be used when the target GVC has dedicated load balancing enabled and the Domain is configured for wildcard support. Please contact us on Slack or at support@controlplane.com for additional details.
Port int
For the linked workload, the port to route traffic to.
Prefix Changes to this property will trigger replacement. string
The path will match any unmatched path prefixes for the subdomain.
Regex Changes to this property will trigger replacement. string
Used to match URI paths. Uses the google re2 regex syntax.
ReplacePrefix string
A path prefix can be configured to be replaced when forwarding the request to the Workload.
DomainLink
This property is required.
Changes to this property will trigger replacement.
string
The self link of the domain to add the route to.
WorkloadLink This property is required. string
The link of the workload to map the prefix to.
DomainPort Changes to this property will trigger replacement. int
The port the route corresponds to. Default: 443
Headers DomainRouteHeadersArgs
Modify the headers for all http requests for this route.
HostPrefix string
This option allows forwarding traffic for different host headers to different workloads. This will only be used when the target GVC has dedicated load balancing enabled and the Domain is configured for wildcard support. Please contact us on Slack or at support@controlplane.com for additional details.
Port int
For the linked workload, the port to route traffic to.
Prefix Changes to this property will trigger replacement. string
The path will match any unmatched path prefixes for the subdomain.
Regex Changes to this property will trigger replacement. string
Used to match URI paths. Uses the google re2 regex syntax.
ReplacePrefix string
A path prefix can be configured to be replaced when forwarding the request to the Workload.
domainLink
This property is required.
Changes to this property will trigger replacement.
String
The self link of the domain to add the route to.
workloadLink This property is required. String
The link of the workload to map the prefix to.
domainPort Changes to this property will trigger replacement. Integer
The port the route corresponds to. Default: 443
headers DomainRouteHeaders
Modify the headers for all http requests for this route.
hostPrefix String
This option allows forwarding traffic for different host headers to different workloads. This will only be used when the target GVC has dedicated load balancing enabled and the Domain is configured for wildcard support. Please contact us on Slack or at support@controlplane.com for additional details.
port Integer
For the linked workload, the port to route traffic to.
prefix Changes to this property will trigger replacement. String
The path will match any unmatched path prefixes for the subdomain.
regex Changes to this property will trigger replacement. String
Used to match URI paths. Uses the google re2 regex syntax.
replacePrefix String
A path prefix can be configured to be replaced when forwarding the request to the Workload.
domainLink
This property is required.
Changes to this property will trigger replacement.
string
The self link of the domain to add the route to.
workloadLink This property is required. string
The link of the workload to map the prefix to.
domainPort Changes to this property will trigger replacement. number
The port the route corresponds to. Default: 443
headers DomainRouteHeaders
Modify the headers for all http requests for this route.
hostPrefix string
This option allows forwarding traffic for different host headers to different workloads. This will only be used when the target GVC has dedicated load balancing enabled and the Domain is configured for wildcard support. Please contact us on Slack or at support@controlplane.com for additional details.
port number
For the linked workload, the port to route traffic to.
prefix Changes to this property will trigger replacement. string
The path will match any unmatched path prefixes for the subdomain.
regex Changes to this property will trigger replacement. string
Used to match URI paths. Uses the google re2 regex syntax.
replacePrefix string
A path prefix can be configured to be replaced when forwarding the request to the Workload.
domain_link
This property is required.
Changes to this property will trigger replacement.
str
The self link of the domain to add the route to.
workload_link This property is required. str
The link of the workload to map the prefix to.
domain_port Changes to this property will trigger replacement. int
The port the route corresponds to. Default: 443
headers DomainRouteHeadersArgs
Modify the headers for all http requests for this route.
host_prefix str
This option allows forwarding traffic for different host headers to different workloads. This will only be used when the target GVC has dedicated load balancing enabled and the Domain is configured for wildcard support. Please contact us on Slack or at support@controlplane.com for additional details.
port int
For the linked workload, the port to route traffic to.
prefix Changes to this property will trigger replacement. str
The path will match any unmatched path prefixes for the subdomain.
regex Changes to this property will trigger replacement. str
Used to match URI paths. Uses the google re2 regex syntax.
replace_prefix str
A path prefix can be configured to be replaced when forwarding the request to the Workload.
domainLink
This property is required.
Changes to this property will trigger replacement.
String
The self link of the domain to add the route to.
workloadLink This property is required. String
The link of the workload to map the prefix to.
domainPort Changes to this property will trigger replacement. Number
The port the route corresponds to. Default: 443
headers Property Map
Modify the headers for all http requests for this route.
hostPrefix String
This option allows forwarding traffic for different host headers to different workloads. This will only be used when the target GVC has dedicated load balancing enabled and the Domain is configured for wildcard support. Please contact us on Slack or at support@controlplane.com for additional details.
port Number
For the linked workload, the port to route traffic to.
prefix Changes to this property will trigger replacement. String
The path will match any unmatched path prefixes for the subdomain.
regex Changes to this property will trigger replacement. String
Used to match URI paths. Uses the google re2 regex syntax.
replacePrefix String
A path prefix can be configured to be replaced when forwarding the request to the Workload.

Outputs

All input properties are implicitly available as output properties. Additionally, the DomainRoute 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 DomainRoute Resource

Get an existing DomainRoute 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?: DomainRouteState, opts?: CustomResourceOptions): DomainRoute
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        domain_link: Optional[str] = None,
        domain_port: Optional[int] = None,
        headers: Optional[DomainRouteHeadersArgs] = None,
        host_prefix: Optional[str] = None,
        port: Optional[int] = None,
        prefix: Optional[str] = None,
        regex: Optional[str] = None,
        replace_prefix: Optional[str] = None,
        workload_link: Optional[str] = None) -> DomainRoute
func GetDomainRoute(ctx *Context, name string, id IDInput, state *DomainRouteState, opts ...ResourceOption) (*DomainRoute, error)
public static DomainRoute Get(string name, Input<string> id, DomainRouteState? state, CustomResourceOptions? opts = null)
public static DomainRoute get(String name, Output<String> id, DomainRouteState state, CustomResourceOptions options)
resources:  _:    type: cpln:DomainRoute    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
DomainLink Changes to this property will trigger replacement. string
The self link of the domain to add the route to.
DomainPort Changes to this property will trigger replacement. int
The port the route corresponds to. Default: 443
Headers Pulumiverse.Cpln.Inputs.DomainRouteHeaders
Modify the headers for all http requests for this route.
HostPrefix string
This option allows forwarding traffic for different host headers to different workloads. This will only be used when the target GVC has dedicated load balancing enabled and the Domain is configured for wildcard support. Please contact us on Slack or at support@controlplane.com for additional details.
Port int
For the linked workload, the port to route traffic to.
Prefix Changes to this property will trigger replacement. string
The path will match any unmatched path prefixes for the subdomain.
Regex Changes to this property will trigger replacement. string
Used to match URI paths. Uses the google re2 regex syntax.
ReplacePrefix string
A path prefix can be configured to be replaced when forwarding the request to the Workload.
WorkloadLink string
The link of the workload to map the prefix to.
DomainLink Changes to this property will trigger replacement. string
The self link of the domain to add the route to.
DomainPort Changes to this property will trigger replacement. int
The port the route corresponds to. Default: 443
Headers DomainRouteHeadersArgs
Modify the headers for all http requests for this route.
HostPrefix string
This option allows forwarding traffic for different host headers to different workloads. This will only be used when the target GVC has dedicated load balancing enabled and the Domain is configured for wildcard support. Please contact us on Slack or at support@controlplane.com for additional details.
Port int
For the linked workload, the port to route traffic to.
Prefix Changes to this property will trigger replacement. string
The path will match any unmatched path prefixes for the subdomain.
Regex Changes to this property will trigger replacement. string
Used to match URI paths. Uses the google re2 regex syntax.
ReplacePrefix string
A path prefix can be configured to be replaced when forwarding the request to the Workload.
WorkloadLink string
The link of the workload to map the prefix to.
domainLink Changes to this property will trigger replacement. String
The self link of the domain to add the route to.
domainPort Changes to this property will trigger replacement. Integer
The port the route corresponds to. Default: 443
headers DomainRouteHeaders
Modify the headers for all http requests for this route.
hostPrefix String
This option allows forwarding traffic for different host headers to different workloads. This will only be used when the target GVC has dedicated load balancing enabled and the Domain is configured for wildcard support. Please contact us on Slack or at support@controlplane.com for additional details.
port Integer
For the linked workload, the port to route traffic to.
prefix Changes to this property will trigger replacement. String
The path will match any unmatched path prefixes for the subdomain.
regex Changes to this property will trigger replacement. String
Used to match URI paths. Uses the google re2 regex syntax.
replacePrefix String
A path prefix can be configured to be replaced when forwarding the request to the Workload.
workloadLink String
The link of the workload to map the prefix to.
domainLink Changes to this property will trigger replacement. string
The self link of the domain to add the route to.
domainPort Changes to this property will trigger replacement. number
The port the route corresponds to. Default: 443
headers DomainRouteHeaders
Modify the headers for all http requests for this route.
hostPrefix string
This option allows forwarding traffic for different host headers to different workloads. This will only be used when the target GVC has dedicated load balancing enabled and the Domain is configured for wildcard support. Please contact us on Slack or at support@controlplane.com for additional details.
port number
For the linked workload, the port to route traffic to.
prefix Changes to this property will trigger replacement. string
The path will match any unmatched path prefixes for the subdomain.
regex Changes to this property will trigger replacement. string
Used to match URI paths. Uses the google re2 regex syntax.
replacePrefix string
A path prefix can be configured to be replaced when forwarding the request to the Workload.
workloadLink string
The link of the workload to map the prefix to.
domain_link Changes to this property will trigger replacement. str
The self link of the domain to add the route to.
domain_port Changes to this property will trigger replacement. int
The port the route corresponds to. Default: 443
headers DomainRouteHeadersArgs
Modify the headers for all http requests for this route.
host_prefix str
This option allows forwarding traffic for different host headers to different workloads. This will only be used when the target GVC has dedicated load balancing enabled and the Domain is configured for wildcard support. Please contact us on Slack or at support@controlplane.com for additional details.
port int
For the linked workload, the port to route traffic to.
prefix Changes to this property will trigger replacement. str
The path will match any unmatched path prefixes for the subdomain.
regex Changes to this property will trigger replacement. str
Used to match URI paths. Uses the google re2 regex syntax.
replace_prefix str
A path prefix can be configured to be replaced when forwarding the request to the Workload.
workload_link str
The link of the workload to map the prefix to.
domainLink Changes to this property will trigger replacement. String
The self link of the domain to add the route to.
domainPort Changes to this property will trigger replacement. Number
The port the route corresponds to. Default: 443
headers Property Map
Modify the headers for all http requests for this route.
hostPrefix String
This option allows forwarding traffic for different host headers to different workloads. This will only be used when the target GVC has dedicated load balancing enabled and the Domain is configured for wildcard support. Please contact us on Slack or at support@controlplane.com for additional details.
port Number
For the linked workload, the port to route traffic to.
prefix Changes to this property will trigger replacement. String
The path will match any unmatched path prefixes for the subdomain.
regex Changes to this property will trigger replacement. String
Used to match URI paths. Uses the google re2 regex syntax.
replacePrefix String
A path prefix can be configured to be replaced when forwarding the request to the Workload.
workloadLink String
The link of the workload to map the prefix to.

Supporting Types

DomainRouteHeaders
, DomainRouteHeadersArgs

placeholderAttribute Boolean
request Property Map
Manipulates HTTP headers.

DomainRouteHeadersRequest
, DomainRouteHeadersRequestArgs

PlaceholderAttribute bool
Set Dictionary<string, string>
Sets or overrides headers to all http requests for this route.
PlaceholderAttribute bool
Set map[string]string
Sets or overrides headers to all http requests for this route.
placeholderAttribute Boolean
set Map<String,String>
Sets or overrides headers to all http requests for this route.
placeholderAttribute boolean
set {[key: string]: string}
Sets or overrides headers to all http requests for this route.
placeholder_attribute bool
set Mapping[str, str]
Sets or overrides headers to all http requests for this route.
placeholderAttribute Boolean
set Map<String>
Sets or overrides headers to all http requests for this route.

Package Details

Repository
cpln pulumiverse/pulumi-cpln
License
Apache-2.0
Notes
This Pulumi package is based on the cpln Terraform Provider.