consul.ConfigEntryServiceSplitter
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as consul from "@pulumi/consul";
const web = new consul.ConfigEntry("web", {
name: "web",
kind: "service-defaults",
configJson: JSON.stringify({
Protocol: "http",
Expose: {},
MeshGateway: {},
TransparentProxy: {},
}),
});
const serviceResolver = new consul.ConfigEntryServiceResolver("service_resolver", {
name: "service-resolver",
defaultSubset: "v1",
subsets: [
{
name: "v1",
filter: "Service.Meta.version == v1",
},
{
name: "v2",
filter: "Service.Meta.version == v2",
},
],
});
const foo = new consul.ConfigEntryServiceSplitter("foo", {
name: serviceResolver.name,
meta: {
key: "value",
},
splits: [
{
weight: 80,
service: "web",
serviceSubset: "v1",
requestHeaders: {
set: {
"x-web-version": "from-v1",
},
},
responseHeaders: {
set: {
"x-web-version": "to-v1",
},
},
},
{
weight: 10,
service: "web",
serviceSubset: "v2",
requestHeaders: {
set: {
"x-web-version": "from-v2",
},
},
responseHeaders: {
set: {
"x-web-version": "to-v2",
},
},
},
{
weight: 10,
service: "web",
serviceSubset: "v2",
},
],
});
import pulumi
import json
import pulumi_consul as consul
web = consul.ConfigEntry("web",
name="web",
kind="service-defaults",
config_json=json.dumps({
"Protocol": "http",
"Expose": {},
"MeshGateway": {},
"TransparentProxy": {},
}))
service_resolver = consul.ConfigEntryServiceResolver("service_resolver",
name="service-resolver",
default_subset="v1",
subsets=[
{
"name": "v1",
"filter": "Service.Meta.version == v1",
},
{
"name": "v2",
"filter": "Service.Meta.version == v2",
},
])
foo = consul.ConfigEntryServiceSplitter("foo",
name=service_resolver.name,
meta={
"key": "value",
},
splits=[
{
"weight": 80,
"service": "web",
"service_subset": "v1",
"request_headers": {
"set": {
"x_web_version": "from-v1",
},
},
"response_headers": {
"set": {
"x_web_version": "to-v1",
},
},
},
{
"weight": 10,
"service": "web",
"service_subset": "v2",
"request_headers": {
"set": {
"x_web_version": "from-v2",
},
},
"response_headers": {
"set": {
"x_web_version": "to-v2",
},
},
},
{
"weight": 10,
"service": "web",
"service_subset": "v2",
},
])
package main
import (
"encoding/json"
"github.com/pulumi/pulumi-consul/sdk/v3/go/consul"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
tmpJSON0, err := json.Marshal(map[string]interface{}{
"Protocol": "http",
"Expose": map[string]interface{}{},
"MeshGateway": map[string]interface{}{},
"TransparentProxy": map[string]interface{}{},
})
if err != nil {
return err
}
json0 := string(tmpJSON0)
_, err = consul.NewConfigEntry(ctx, "web", &consul.ConfigEntryArgs{
Name: pulumi.String("web"),
Kind: pulumi.String("service-defaults"),
ConfigJson: pulumi.String(json0),
})
if err != nil {
return err
}
serviceResolver, err := consul.NewConfigEntryServiceResolver(ctx, "service_resolver", &consul.ConfigEntryServiceResolverArgs{
Name: pulumi.String("service-resolver"),
DefaultSubset: pulumi.String("v1"),
Subsets: consul.ConfigEntryServiceResolverSubsetArray{
&consul.ConfigEntryServiceResolverSubsetArgs{
Name: pulumi.String("v1"),
Filter: pulumi.String("Service.Meta.version == v1"),
},
&consul.ConfigEntryServiceResolverSubsetArgs{
Name: pulumi.String("v2"),
Filter: pulumi.String("Service.Meta.version == v2"),
},
},
})
if err != nil {
return err
}
_, err = consul.NewConfigEntryServiceSplitter(ctx, "foo", &consul.ConfigEntryServiceSplitterArgs{
Name: serviceResolver.Name,
Meta: pulumi.StringMap{
"key": pulumi.String("value"),
},
Splits: consul.ConfigEntryServiceSplitterSplitArray{
&consul.ConfigEntryServiceSplitterSplitArgs{
Weight: pulumi.Float64(80),
Service: pulumi.String("web"),
ServiceSubset: pulumi.String("v1"),
RequestHeaders: &consul.ConfigEntryServiceSplitterSplitRequestHeadersArgs{
Set: pulumi.StringMap{
"x-web-version": pulumi.String("from-v1"),
},
},
ResponseHeaders: &consul.ConfigEntryServiceSplitterSplitResponseHeadersArgs{
Set: pulumi.StringMap{
"x-web-version": pulumi.String("to-v1"),
},
},
},
&consul.ConfigEntryServiceSplitterSplitArgs{
Weight: pulumi.Float64(10),
Service: pulumi.String("web"),
ServiceSubset: pulumi.String("v2"),
RequestHeaders: &consul.ConfigEntryServiceSplitterSplitRequestHeadersArgs{
Set: pulumi.StringMap{
"x-web-version": pulumi.String("from-v2"),
},
},
ResponseHeaders: &consul.ConfigEntryServiceSplitterSplitResponseHeadersArgs{
Set: pulumi.StringMap{
"x-web-version": pulumi.String("to-v2"),
},
},
},
&consul.ConfigEntryServiceSplitterSplitArgs{
Weight: pulumi.Float64(10),
Service: pulumi.String("web"),
ServiceSubset: pulumi.String("v2"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Consul = Pulumi.Consul;
return await Deployment.RunAsync(() =>
{
var web = new Consul.ConfigEntry("web", new()
{
Name = "web",
Kind = "service-defaults",
ConfigJson = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["Protocol"] = "http",
["Expose"] = new Dictionary<string, object?>
{
},
["MeshGateway"] = new Dictionary<string, object?>
{
},
["TransparentProxy"] = new Dictionary<string, object?>
{
},
}),
});
var serviceResolver = new Consul.ConfigEntryServiceResolver("service_resolver", new()
{
Name = "service-resolver",
DefaultSubset = "v1",
Subsets = new[]
{
new Consul.Inputs.ConfigEntryServiceResolverSubsetArgs
{
Name = "v1",
Filter = "Service.Meta.version == v1",
},
new Consul.Inputs.ConfigEntryServiceResolverSubsetArgs
{
Name = "v2",
Filter = "Service.Meta.version == v2",
},
},
});
var foo = new Consul.ConfigEntryServiceSplitter("foo", new()
{
Name = serviceResolver.Name,
Meta =
{
{ "key", "value" },
},
Splits = new[]
{
new Consul.Inputs.ConfigEntryServiceSplitterSplitArgs
{
Weight = 80,
Service = "web",
ServiceSubset = "v1",
RequestHeaders = new Consul.Inputs.ConfigEntryServiceSplitterSplitRequestHeadersArgs
{
Set =
{
{ "x-web-version", "from-v1" },
},
},
ResponseHeaders = new Consul.Inputs.ConfigEntryServiceSplitterSplitResponseHeadersArgs
{
Set =
{
{ "x-web-version", "to-v1" },
},
},
},
new Consul.Inputs.ConfigEntryServiceSplitterSplitArgs
{
Weight = 10,
Service = "web",
ServiceSubset = "v2",
RequestHeaders = new Consul.Inputs.ConfigEntryServiceSplitterSplitRequestHeadersArgs
{
Set =
{
{ "x-web-version", "from-v2" },
},
},
ResponseHeaders = new Consul.Inputs.ConfigEntryServiceSplitterSplitResponseHeadersArgs
{
Set =
{
{ "x-web-version", "to-v2" },
},
},
},
new Consul.Inputs.ConfigEntryServiceSplitterSplitArgs
{
Weight = 10,
Service = "web",
ServiceSubset = "v2",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.consul.ConfigEntry;
import com.pulumi.consul.ConfigEntryArgs;
import com.pulumi.consul.ConfigEntryServiceResolver;
import com.pulumi.consul.ConfigEntryServiceResolverArgs;
import com.pulumi.consul.inputs.ConfigEntryServiceResolverSubsetArgs;
import com.pulumi.consul.ConfigEntryServiceSplitter;
import com.pulumi.consul.ConfigEntryServiceSplitterArgs;
import com.pulumi.consul.inputs.ConfigEntryServiceSplitterSplitArgs;
import com.pulumi.consul.inputs.ConfigEntryServiceSplitterSplitRequestHeadersArgs;
import com.pulumi.consul.inputs.ConfigEntryServiceSplitterSplitResponseHeadersArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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 web = new ConfigEntry("web", ConfigEntryArgs.builder()
.name("web")
.kind("service-defaults")
.configJson(serializeJson(
jsonObject(
jsonProperty("Protocol", "http"),
jsonProperty("Expose", jsonObject(
)),
jsonProperty("MeshGateway", jsonObject(
)),
jsonProperty("TransparentProxy", jsonObject(
))
)))
.build());
var serviceResolver = new ConfigEntryServiceResolver("serviceResolver", ConfigEntryServiceResolverArgs.builder()
.name("service-resolver")
.defaultSubset("v1")
.subsets(
ConfigEntryServiceResolverSubsetArgs.builder()
.name("v1")
.filter("Service.Meta.version == v1")
.build(),
ConfigEntryServiceResolverSubsetArgs.builder()
.name("v2")
.filter("Service.Meta.version == v2")
.build())
.build());
var foo = new ConfigEntryServiceSplitter("foo", ConfigEntryServiceSplitterArgs.builder()
.name(serviceResolver.name())
.meta(Map.of("key", "value"))
.splits(
ConfigEntryServiceSplitterSplitArgs.builder()
.weight(80)
.service("web")
.serviceSubset("v1")
.requestHeaders(ConfigEntryServiceSplitterSplitRequestHeadersArgs.builder()
.set(Map.of("x-web-version", "from-v1"))
.build())
.responseHeaders(ConfigEntryServiceSplitterSplitResponseHeadersArgs.builder()
.set(Map.of("x-web-version", "to-v1"))
.build())
.build(),
ConfigEntryServiceSplitterSplitArgs.builder()
.weight(10)
.service("web")
.serviceSubset("v2")
.requestHeaders(ConfigEntryServiceSplitterSplitRequestHeadersArgs.builder()
.set(Map.of("x-web-version", "from-v2"))
.build())
.responseHeaders(ConfigEntryServiceSplitterSplitResponseHeadersArgs.builder()
.set(Map.of("x-web-version", "to-v2"))
.build())
.build(),
ConfigEntryServiceSplitterSplitArgs.builder()
.weight(10)
.service("web")
.serviceSubset("v2")
.build())
.build());
}
}
resources:
web:
type: consul:ConfigEntry
properties:
name: web
kind: service-defaults
configJson:
fn::toJSON:
Protocol: http
Expose: {}
MeshGateway: {}
TransparentProxy: {}
serviceResolver:
type: consul:ConfigEntryServiceResolver
name: service_resolver
properties:
name: service-resolver
defaultSubset: v1
subsets:
- name: v1
filter: Service.Meta.version == v1
- name: v2
filter: Service.Meta.version == v2
foo:
type: consul:ConfigEntryServiceSplitter
properties:
name: ${serviceResolver.name}
meta:
key: value
splits:
- weight: 80
service: web
serviceSubset: v1
requestHeaders:
set:
x-web-version: from-v1
responseHeaders:
set:
x-web-version: to-v1
- weight: 10
service: web
serviceSubset: v2
requestHeaders:
set:
x-web-version: from-v2
responseHeaders:
set:
x-web-version: to-v2
- weight: 10
service: web
serviceSubset: v2
Create ConfigEntryServiceSplitter Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ConfigEntryServiceSplitter(name: string, args: ConfigEntryServiceSplitterArgs, opts?: CustomResourceOptions);
@overload
def ConfigEntryServiceSplitter(resource_name: str,
args: ConfigEntryServiceSplitterArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ConfigEntryServiceSplitter(resource_name: str,
opts: Optional[ResourceOptions] = None,
splits: Optional[Sequence[ConfigEntryServiceSplitterSplitArgs]] = None,
meta: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
namespace: Optional[str] = None,
partition: Optional[str] = None)
func NewConfigEntryServiceSplitter(ctx *Context, name string, args ConfigEntryServiceSplitterArgs, opts ...ResourceOption) (*ConfigEntryServiceSplitter, error)
public ConfigEntryServiceSplitter(string name, ConfigEntryServiceSplitterArgs args, CustomResourceOptions? opts = null)
public ConfigEntryServiceSplitter(String name, ConfigEntryServiceSplitterArgs args)
public ConfigEntryServiceSplitter(String name, ConfigEntryServiceSplitterArgs args, CustomResourceOptions options)
type: consul:ConfigEntryServiceSplitter
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 ConfigEntryServiceSplitterArgs
- 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 ConfigEntryServiceSplitterArgs
- 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 ConfigEntryServiceSplitterArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ConfigEntryServiceSplitterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ConfigEntryServiceSplitterArgs
- 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 configEntryServiceSplitterResource = new Consul.ConfigEntryServiceSplitter("configEntryServiceSplitterResource", new()
{
Splits = new[]
{
new Consul.Inputs.ConfigEntryServiceSplitterSplitArgs
{
Service = "string",
Weight = 0,
Namespace = "string",
Partition = "string",
RequestHeaders = new Consul.Inputs.ConfigEntryServiceSplitterSplitRequestHeadersArgs
{
Add =
{
{ "string", "string" },
},
Removes = new[]
{
"string",
},
Set =
{
{ "string", "string" },
},
},
ResponseHeaders = new Consul.Inputs.ConfigEntryServiceSplitterSplitResponseHeadersArgs
{
Add =
{
{ "string", "string" },
},
Removes = new[]
{
"string",
},
Set =
{
{ "string", "string" },
},
},
ServiceSubset = "string",
},
},
Meta =
{
{ "string", "string" },
},
Name = "string",
Namespace = "string",
Partition = "string",
});
example, err := consul.NewConfigEntryServiceSplitter(ctx, "configEntryServiceSplitterResource", &consul.ConfigEntryServiceSplitterArgs{
Splits: consul.ConfigEntryServiceSplitterSplitArray{
&consul.ConfigEntryServiceSplitterSplitArgs{
Service: pulumi.String("string"),
Weight: pulumi.Float64(0),
Namespace: pulumi.String("string"),
Partition: pulumi.String("string"),
RequestHeaders: &consul.ConfigEntryServiceSplitterSplitRequestHeadersArgs{
Add: pulumi.StringMap{
"string": pulumi.String("string"),
},
Removes: pulumi.StringArray{
pulumi.String("string"),
},
Set: pulumi.StringMap{
"string": pulumi.String("string"),
},
},
ResponseHeaders: &consul.ConfigEntryServiceSplitterSplitResponseHeadersArgs{
Add: pulumi.StringMap{
"string": pulumi.String("string"),
},
Removes: pulumi.StringArray{
pulumi.String("string"),
},
Set: pulumi.StringMap{
"string": pulumi.String("string"),
},
},
ServiceSubset: pulumi.String("string"),
},
},
Meta: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
Namespace: pulumi.String("string"),
Partition: pulumi.String("string"),
})
var configEntryServiceSplitterResource = new ConfigEntryServiceSplitter("configEntryServiceSplitterResource", ConfigEntryServiceSplitterArgs.builder()
.splits(ConfigEntryServiceSplitterSplitArgs.builder()
.service("string")
.weight(0)
.namespace("string")
.partition("string")
.requestHeaders(ConfigEntryServiceSplitterSplitRequestHeadersArgs.builder()
.add(Map.of("string", "string"))
.removes("string")
.set(Map.of("string", "string"))
.build())
.responseHeaders(ConfigEntryServiceSplitterSplitResponseHeadersArgs.builder()
.add(Map.of("string", "string"))
.removes("string")
.set(Map.of("string", "string"))
.build())
.serviceSubset("string")
.build())
.meta(Map.of("string", "string"))
.name("string")
.namespace("string")
.partition("string")
.build());
config_entry_service_splitter_resource = consul.ConfigEntryServiceSplitter("configEntryServiceSplitterResource",
splits=[{
"service": "string",
"weight": 0,
"namespace": "string",
"partition": "string",
"request_headers": {
"add": {
"string": "string",
},
"removes": ["string"],
"set": {
"string": "string",
},
},
"response_headers": {
"add": {
"string": "string",
},
"removes": ["string"],
"set": {
"string": "string",
},
},
"service_subset": "string",
}],
meta={
"string": "string",
},
name="string",
namespace="string",
partition="string")
const configEntryServiceSplitterResource = new consul.ConfigEntryServiceSplitter("configEntryServiceSplitterResource", {
splits: [{
service: "string",
weight: 0,
namespace: "string",
partition: "string",
requestHeaders: {
add: {
string: "string",
},
removes: ["string"],
set: {
string: "string",
},
},
responseHeaders: {
add: {
string: "string",
},
removes: ["string"],
set: {
string: "string",
},
},
serviceSubset: "string",
}],
meta: {
string: "string",
},
name: "string",
namespace: "string",
partition: "string",
});
type: consul:ConfigEntryServiceSplitter
properties:
meta:
string: string
name: string
namespace: string
partition: string
splits:
- namespace: string
partition: string
requestHeaders:
add:
string: string
removes:
- string
set:
string: string
responseHeaders:
add:
string: string
removes:
- string
set:
string: string
service: string
serviceSubset: string
weight: 0
ConfigEntryServiceSplitter 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 ConfigEntryServiceSplitter resource accepts the following input properties:
- Splits
List<Config
Entry Service Splitter Split> - Defines how much traffic to send to sets of service instances during a traffic split.
- Meta Dictionary<string, string>
- Specifies key-value pairs to add to the KV store.
- Name string
- Specifies a name for the configuration entry.
- Namespace string
- Specifies the namespace to apply the configuration entry.
- Partition string
- Specifies the admin partition to apply the configuration entry.
- Splits
[]Config
Entry Service Splitter Split Args - Defines how much traffic to send to sets of service instances during a traffic split.
- Meta map[string]string
- Specifies key-value pairs to add to the KV store.
- Name string
- Specifies a name for the configuration entry.
- Namespace string
- Specifies the namespace to apply the configuration entry.
- Partition string
- Specifies the admin partition to apply the configuration entry.
- splits
List<Config
Entry Service Splitter Split> - Defines how much traffic to send to sets of service instances during a traffic split.
- meta Map<String,String>
- Specifies key-value pairs to add to the KV store.
- name String
- Specifies a name for the configuration entry.
- namespace String
- Specifies the namespace to apply the configuration entry.
- partition String
- Specifies the admin partition to apply the configuration entry.
- splits
Config
Entry Service Splitter Split[] - Defines how much traffic to send to sets of service instances during a traffic split.
- meta {[key: string]: string}
- Specifies key-value pairs to add to the KV store.
- name string
- Specifies a name for the configuration entry.
- namespace string
- Specifies the namespace to apply the configuration entry.
- partition string
- Specifies the admin partition to apply the configuration entry.
- splits
Sequence[Config
Entry Service Splitter Split Args] - Defines how much traffic to send to sets of service instances during a traffic split.
- meta Mapping[str, str]
- Specifies key-value pairs to add to the KV store.
- name str
- Specifies a name for the configuration entry.
- namespace str
- Specifies the namespace to apply the configuration entry.
- partition str
- Specifies the admin partition to apply the configuration entry.
- splits List<Property Map>
- Defines how much traffic to send to sets of service instances during a traffic split.
- meta Map<String>
- Specifies key-value pairs to add to the KV store.
- name String
- Specifies a name for the configuration entry.
- namespace String
- Specifies the namespace to apply the configuration entry.
- partition String
- Specifies the admin partition to apply the configuration entry.
Outputs
All input properties are implicitly available as output properties. Additionally, the ConfigEntryServiceSplitter 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 ConfigEntryServiceSplitter Resource
Get an existing ConfigEntryServiceSplitter 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?: ConfigEntryServiceSplitterState, opts?: CustomResourceOptions): ConfigEntryServiceSplitter
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
meta: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
namespace: Optional[str] = None,
partition: Optional[str] = None,
splits: Optional[Sequence[ConfigEntryServiceSplitterSplitArgs]] = None) -> ConfigEntryServiceSplitter
func GetConfigEntryServiceSplitter(ctx *Context, name string, id IDInput, state *ConfigEntryServiceSplitterState, opts ...ResourceOption) (*ConfigEntryServiceSplitter, error)
public static ConfigEntryServiceSplitter Get(string name, Input<string> id, ConfigEntryServiceSplitterState? state, CustomResourceOptions? opts = null)
public static ConfigEntryServiceSplitter get(String name, Output<String> id, ConfigEntryServiceSplitterState 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.
- Meta Dictionary<string, string>
- Specifies key-value pairs to add to the KV store.
- Name string
- Specifies a name for the configuration entry.
- Namespace string
- Specifies the namespace to apply the configuration entry.
- Partition string
- Specifies the admin partition to apply the configuration entry.
- Splits
List<Config
Entry Service Splitter Split> - Defines how much traffic to send to sets of service instances during a traffic split.
- Meta map[string]string
- Specifies key-value pairs to add to the KV store.
- Name string
- Specifies a name for the configuration entry.
- Namespace string
- Specifies the namespace to apply the configuration entry.
- Partition string
- Specifies the admin partition to apply the configuration entry.
- Splits
[]Config
Entry Service Splitter Split Args - Defines how much traffic to send to sets of service instances during a traffic split.
- meta Map<String,String>
- Specifies key-value pairs to add to the KV store.
- name String
- Specifies a name for the configuration entry.
- namespace String
- Specifies the namespace to apply the configuration entry.
- partition String
- Specifies the admin partition to apply the configuration entry.
- splits
List<Config
Entry Service Splitter Split> - Defines how much traffic to send to sets of service instances during a traffic split.
- meta {[key: string]: string}
- Specifies key-value pairs to add to the KV store.
- name string
- Specifies a name for the configuration entry.
- namespace string
- Specifies the namespace to apply the configuration entry.
- partition string
- Specifies the admin partition to apply the configuration entry.
- splits
Config
Entry Service Splitter Split[] - Defines how much traffic to send to sets of service instances during a traffic split.
- meta Mapping[str, str]
- Specifies key-value pairs to add to the KV store.
- name str
- Specifies a name for the configuration entry.
- namespace str
- Specifies the namespace to apply the configuration entry.
- partition str
- Specifies the admin partition to apply the configuration entry.
- splits
Sequence[Config
Entry Service Splitter Split Args] - Defines how much traffic to send to sets of service instances during a traffic split.
- meta Map<String>
- Specifies key-value pairs to add to the KV store.
- name String
- Specifies a name for the configuration entry.
- namespace String
- Specifies the namespace to apply the configuration entry.
- partition String
- Specifies the admin partition to apply the configuration entry.
- splits List<Property Map>
- Defines how much traffic to send to sets of service instances during a traffic split.
Supporting Types
ConfigEntryServiceSplitterSplit, ConfigEntryServiceSplitterSplitArgs
- Service string
- Specifies the name of the service to resolve.
- Weight double
- Specifies the percentage of traffic sent to the set of service instances specified in the
service
field. Each weight must be a floating integer between0
and100
. The smallest representable value is.01
. The sum of weights across all splits must add up to100
. - Namespace string
- Specifies the namespace to use in the FQDN when resolving the service.
- Partition string
- Specifies the admin partition to use in the FQDN when resolving the service.
- Request
Headers ConfigEntry Service Splitter Split Request Headers - Specifies a set of HTTP-specific header modification rules applied to requests routed with the service split. You cannot configure request headers if the listener protocol is set to
tcp
. - Response
Headers ConfigEntry Service Splitter Split Response Headers - Specifies a set of HTTP-specific header modification rules applied to responses routed with the service split. You cannot configure request headers if the listener protocol is set to
tcp
. - Service
Subset string - Specifies a subset of the service to resolve. A service subset assigns a name to a specific subset of discoverable service instances within a datacenter, such as
version2
orcanary
. All services have an unnamed default subset that returns all healthy instances.
- Service string
- Specifies the name of the service to resolve.
- Weight float64
- Specifies the percentage of traffic sent to the set of service instances specified in the
service
field. Each weight must be a floating integer between0
and100
. The smallest representable value is.01
. The sum of weights across all splits must add up to100
. - Namespace string
- Specifies the namespace to use in the FQDN when resolving the service.
- Partition string
- Specifies the admin partition to use in the FQDN when resolving the service.
- Request
Headers ConfigEntry Service Splitter Split Request Headers - Specifies a set of HTTP-specific header modification rules applied to requests routed with the service split. You cannot configure request headers if the listener protocol is set to
tcp
. - Response
Headers ConfigEntry Service Splitter Split Response Headers - Specifies a set of HTTP-specific header modification rules applied to responses routed with the service split. You cannot configure request headers if the listener protocol is set to
tcp
. - Service
Subset string - Specifies a subset of the service to resolve. A service subset assigns a name to a specific subset of discoverable service instances within a datacenter, such as
version2
orcanary
. All services have an unnamed default subset that returns all healthy instances.
- service String
- Specifies the name of the service to resolve.
- weight Double
- Specifies the percentage of traffic sent to the set of service instances specified in the
service
field. Each weight must be a floating integer between0
and100
. The smallest representable value is.01
. The sum of weights across all splits must add up to100
. - namespace String
- Specifies the namespace to use in the FQDN when resolving the service.
- partition String
- Specifies the admin partition to use in the FQDN when resolving the service.
- request
Headers ConfigEntry Service Splitter Split Request Headers - Specifies a set of HTTP-specific header modification rules applied to requests routed with the service split. You cannot configure request headers if the listener protocol is set to
tcp
. - response
Headers ConfigEntry Service Splitter Split Response Headers - Specifies a set of HTTP-specific header modification rules applied to responses routed with the service split. You cannot configure request headers if the listener protocol is set to
tcp
. - service
Subset String - Specifies a subset of the service to resolve. A service subset assigns a name to a specific subset of discoverable service instances within a datacenter, such as
version2
orcanary
. All services have an unnamed default subset that returns all healthy instances.
- service string
- Specifies the name of the service to resolve.
- weight number
- Specifies the percentage of traffic sent to the set of service instances specified in the
service
field. Each weight must be a floating integer between0
and100
. The smallest representable value is.01
. The sum of weights across all splits must add up to100
. - namespace string
- Specifies the namespace to use in the FQDN when resolving the service.
- partition string
- Specifies the admin partition to use in the FQDN when resolving the service.
- request
Headers ConfigEntry Service Splitter Split Request Headers - Specifies a set of HTTP-specific header modification rules applied to requests routed with the service split. You cannot configure request headers if the listener protocol is set to
tcp
. - response
Headers ConfigEntry Service Splitter Split Response Headers - Specifies a set of HTTP-specific header modification rules applied to responses routed with the service split. You cannot configure request headers if the listener protocol is set to
tcp
. - service
Subset string - Specifies a subset of the service to resolve. A service subset assigns a name to a specific subset of discoverable service instances within a datacenter, such as
version2
orcanary
. All services have an unnamed default subset that returns all healthy instances.
- service str
- Specifies the name of the service to resolve.
- weight float
- Specifies the percentage of traffic sent to the set of service instances specified in the
service
field. Each weight must be a floating integer between0
and100
. The smallest representable value is.01
. The sum of weights across all splits must add up to100
. - namespace str
- Specifies the namespace to use in the FQDN when resolving the service.
- partition str
- Specifies the admin partition to use in the FQDN when resolving the service.
- request_
headers ConfigEntry Service Splitter Split Request Headers - Specifies a set of HTTP-specific header modification rules applied to requests routed with the service split. You cannot configure request headers if the listener protocol is set to
tcp
. - response_
headers ConfigEntry Service Splitter Split Response Headers - Specifies a set of HTTP-specific header modification rules applied to responses routed with the service split. You cannot configure request headers if the listener protocol is set to
tcp
. - service_
subset str - Specifies a subset of the service to resolve. A service subset assigns a name to a specific subset of discoverable service instances within a datacenter, such as
version2
orcanary
. All services have an unnamed default subset that returns all healthy instances.
- service String
- Specifies the name of the service to resolve.
- weight Number
- Specifies the percentage of traffic sent to the set of service instances specified in the
service
field. Each weight must be a floating integer between0
and100
. The smallest representable value is.01
. The sum of weights across all splits must add up to100
. - namespace String
- Specifies the namespace to use in the FQDN when resolving the service.
- partition String
- Specifies the admin partition to use in the FQDN when resolving the service.
- request
Headers Property Map - Specifies a set of HTTP-specific header modification rules applied to requests routed with the service split. You cannot configure request headers if the listener protocol is set to
tcp
. - response
Headers Property Map - Specifies a set of HTTP-specific header modification rules applied to responses routed with the service split. You cannot configure request headers if the listener protocol is set to
tcp
. - service
Subset String - Specifies a subset of the service to resolve. A service subset assigns a name to a specific subset of discoverable service instances within a datacenter, such as
version2
orcanary
. All services have an unnamed default subset that returns all healthy instances.
ConfigEntryServiceSplitterSplitRequestHeaders, ConfigEntryServiceSplitterSplitRequestHeadersArgs
- Add Dictionary<string, string>
- Map of one or more key-value pairs. Defines a set of key-value pairs to add to the header. Use header names as the keys. Header names are not case-sensitive. If header values with the same name already exist, the value is appended and Consul applies both headers.
- Removes List<string>
- Defines an list of headers to remove. Consul removes only headers containing exact matches. Header names are not case-sensitive.
- Set Dictionary<string, string>
- Map of one or more key-value pairs. Defines a set of key-value pairs to add to the request header or to replace existing header values with. Use header names as the keys. Header names are not case-sensitive. If header values with the same names already exist, Consul replaces the header values.
- Add map[string]string
- Map of one or more key-value pairs. Defines a set of key-value pairs to add to the header. Use header names as the keys. Header names are not case-sensitive. If header values with the same name already exist, the value is appended and Consul applies both headers.
- Removes []string
- Defines an list of headers to remove. Consul removes only headers containing exact matches. Header names are not case-sensitive.
- Set map[string]string
- Map of one or more key-value pairs. Defines a set of key-value pairs to add to the request header or to replace existing header values with. Use header names as the keys. Header names are not case-sensitive. If header values with the same names already exist, Consul replaces the header values.
- add Map<String,String>
- Map of one or more key-value pairs. Defines a set of key-value pairs to add to the header. Use header names as the keys. Header names are not case-sensitive. If header values with the same name already exist, the value is appended and Consul applies both headers.
- removes List<String>
- Defines an list of headers to remove. Consul removes only headers containing exact matches. Header names are not case-sensitive.
- set Map<String,String>
- Map of one or more key-value pairs. Defines a set of key-value pairs to add to the request header or to replace existing header values with. Use header names as the keys. Header names are not case-sensitive. If header values with the same names already exist, Consul replaces the header values.
- add {[key: string]: string}
- Map of one or more key-value pairs. Defines a set of key-value pairs to add to the header. Use header names as the keys. Header names are not case-sensitive. If header values with the same name already exist, the value is appended and Consul applies both headers.
- removes string[]
- Defines an list of headers to remove. Consul removes only headers containing exact matches. Header names are not case-sensitive.
- set {[key: string]: string}
- Map of one or more key-value pairs. Defines a set of key-value pairs to add to the request header or to replace existing header values with. Use header names as the keys. Header names are not case-sensitive. If header values with the same names already exist, Consul replaces the header values.
- add Mapping[str, str]
- Map of one or more key-value pairs. Defines a set of key-value pairs to add to the header. Use header names as the keys. Header names are not case-sensitive. If header values with the same name already exist, the value is appended and Consul applies both headers.
- removes Sequence[str]
- Defines an list of headers to remove. Consul removes only headers containing exact matches. Header names are not case-sensitive.
- set Mapping[str, str]
- Map of one or more key-value pairs. Defines a set of key-value pairs to add to the request header or to replace existing header values with. Use header names as the keys. Header names are not case-sensitive. If header values with the same names already exist, Consul replaces the header values.
- add Map<String>
- Map of one or more key-value pairs. Defines a set of key-value pairs to add to the header. Use header names as the keys. Header names are not case-sensitive. If header values with the same name already exist, the value is appended and Consul applies both headers.
- removes List<String>
- Defines an list of headers to remove. Consul removes only headers containing exact matches. Header names are not case-sensitive.
- set Map<String>
- Map of one or more key-value pairs. Defines a set of key-value pairs to add to the request header or to replace existing header values with. Use header names as the keys. Header names are not case-sensitive. If header values with the same names already exist, Consul replaces the header values.
ConfigEntryServiceSplitterSplitResponseHeaders, ConfigEntryServiceSplitterSplitResponseHeadersArgs
- Add Dictionary<string, string>
- Map of one or more key-value pairs. Defines a set of key-value pairs to add to the header. Use header names as the keys. Header names are not case-sensitive. If header values with the same name already exist, the value is appended and Consul applies both headers.
- Removes List<string>
- Defines an list of headers to remove. Consul removes only headers containing exact matches. Header names are not case-sensitive.
- Set Dictionary<string, string>
- Map of one or more key-value pairs. Defines a set of key-value pairs to add to the request header or to replace existing header values with. Use header names as the keys. Header names are not case-sensitive. If header values with the same names already exist, Consul replaces the header values.
- Add map[string]string
- Map of one or more key-value pairs. Defines a set of key-value pairs to add to the header. Use header names as the keys. Header names are not case-sensitive. If header values with the same name already exist, the value is appended and Consul applies both headers.
- Removes []string
- Defines an list of headers to remove. Consul removes only headers containing exact matches. Header names are not case-sensitive.
- Set map[string]string
- Map of one or more key-value pairs. Defines a set of key-value pairs to add to the request header or to replace existing header values with. Use header names as the keys. Header names are not case-sensitive. If header values with the same names already exist, Consul replaces the header values.
- add Map<String,String>
- Map of one or more key-value pairs. Defines a set of key-value pairs to add to the header. Use header names as the keys. Header names are not case-sensitive. If header values with the same name already exist, the value is appended and Consul applies both headers.
- removes List<String>
- Defines an list of headers to remove. Consul removes only headers containing exact matches. Header names are not case-sensitive.
- set Map<String,String>
- Map of one or more key-value pairs. Defines a set of key-value pairs to add to the request header or to replace existing header values with. Use header names as the keys. Header names are not case-sensitive. If header values with the same names already exist, Consul replaces the header values.
- add {[key: string]: string}
- Map of one or more key-value pairs. Defines a set of key-value pairs to add to the header. Use header names as the keys. Header names are not case-sensitive. If header values with the same name already exist, the value is appended and Consul applies both headers.
- removes string[]
- Defines an list of headers to remove. Consul removes only headers containing exact matches. Header names are not case-sensitive.
- set {[key: string]: string}
- Map of one or more key-value pairs. Defines a set of key-value pairs to add to the request header or to replace existing header values with. Use header names as the keys. Header names are not case-sensitive. If header values with the same names already exist, Consul replaces the header values.
- add Mapping[str, str]
- Map of one or more key-value pairs. Defines a set of key-value pairs to add to the header. Use header names as the keys. Header names are not case-sensitive. If header values with the same name already exist, the value is appended and Consul applies both headers.
- removes Sequence[str]
- Defines an list of headers to remove. Consul removes only headers containing exact matches. Header names are not case-sensitive.
- set Mapping[str, str]
- Map of one or more key-value pairs. Defines a set of key-value pairs to add to the request header or to replace existing header values with. Use header names as the keys. Header names are not case-sensitive. If header values with the same names already exist, Consul replaces the header values.
- add Map<String>
- Map of one or more key-value pairs. Defines a set of key-value pairs to add to the header. Use header names as the keys. Header names are not case-sensitive. If header values with the same name already exist, the value is appended and Consul applies both headers.
- removes List<String>
- Defines an list of headers to remove. Consul removes only headers containing exact matches. Header names are not case-sensitive.
- set Map<String>
- Map of one or more key-value pairs. Defines a set of key-value pairs to add to the request header or to replace existing header values with. Use header names as the keys. Header names are not case-sensitive. If header values with the same names already exist, Consul replaces the header values.
Import
$ pulumi import consul:index/configEntryServiceSplitter:ConfigEntryServiceSplitter foo web
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- HashiCorp Consul pulumi/pulumi-consul
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
consul
Terraform Provider.