1. Packages
  2. HashiCorp Consul
  3. API Docs
  4. ConfigEntryServiceSplitter
Consul v3.11.2 published on Thursday, Mar 21, 2024 by Pulumi

consul.ConfigEntryServiceSplitter

Explore with Pulumi AI

consul logo
Consul v3.11.2 published on Thursday, Mar 21, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as consul from "@pulumi/consul";
    
    const web = new consul.ConfigEntry("web", {
        kind: "service-defaults",
        configJson: JSON.stringify({
            Protocol: "http",
            Expose: {},
            MeshGateway: {},
            TransparentProxy: {},
        }),
    });
    const serviceResolver = new consul.ConfigEntryServiceResolver("serviceResolver", {
        defaultSubset: "v1",
        subsets: [
            {
                name: "v1",
                filter: "Service.Meta.version == v1",
            },
            {
                name: "v2",
                Filter: "Service.Meta.version == v2",
            },
        ],
    });
    const foo = new consul.ConfigEntryServiceSplitter("foo", {
        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",
        kind="service-defaults",
        config_json=json.dumps({
            "Protocol": "http",
            "Expose": {},
            "MeshGateway": {},
            "TransparentProxy": {},
        }))
    service_resolver = consul.ConfigEntryServiceResolver("serviceResolver",
        default_subset="v1",
        subsets=[
            consul.ConfigEntryServiceResolverSubsetArgs(
                name="v1",
                filter="Service.Meta.version == v1",
            ),
            consul.ConfigEntryServiceResolverSubsetArgs(
                name="v2",
                filter="Service.Meta.version == v2",
            ),
        ])
    foo = consul.ConfigEntryServiceSplitter("foo",
        meta={
            "key": "value",
        },
        splits=[
            consul.ConfigEntryServiceSplitterSplitArgs(
                weight=80,
                service="web",
                service_subset="v1",
                request_headers=consul.ConfigEntryServiceSplitterSplitRequestHeadersArgs(
                    set={
                        "x-web-version": "from-v1",
                    },
                ),
                response_headers=consul.ConfigEntryServiceSplitterSplitResponseHeadersArgs(
                    set={
                        "x-web-version": "to-v1",
                    },
                ),
            ),
            consul.ConfigEntryServiceSplitterSplitArgs(
                weight=10,
                service="web",
                service_subset="v2",
                request_headers=consul.ConfigEntryServiceSplitterSplitRequestHeadersArgs(
                    set={
                        "x-web-version": "from-v2",
                    },
                ),
                response_headers=consul.ConfigEntryServiceSplitterSplitResponseHeadersArgs(
                    set={
                        "x-web-version": "to-v2",
                    },
                ),
            ),
            consul.ConfigEntryServiceSplitterSplitArgs(
                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":           nil,
    			"MeshGateway":      nil,
    			"TransparentProxy": nil,
    		})
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		_, err = consul.NewConfigEntry(ctx, "web", &consul.ConfigEntryArgs{
    			Kind:       pulumi.String("service-defaults"),
    			ConfigJson: pulumi.String(json0),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = consul.NewConfigEntryServiceResolver(ctx, "serviceResolver", &consul.ConfigEntryServiceResolverArgs{
    			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{
    			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()
        {
            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("serviceResolver", new()
        {
            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()
        {
            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()        
                .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()        
                .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()        
                .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:
          kind: service-defaults
          configJson:
            fn::toJSON:
              Protocol: http
              Expose: {}
              MeshGateway: {}
              TransparentProxy: {}
      serviceResolver:
        type: consul:ConfigEntryServiceResolver
        properties:
          defaultSubset: v1
          subsets:
            - name: v1
              filter: Service.Meta.version == v1
            - name: v2
              Filter: Service.Meta.version == v2
      foo:
        type: consul:ConfigEntryServiceSplitter
        properties:
          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.

    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=[consul.ConfigEntryServiceSplitterSplitArgs(
            service="string",
            weight=0,
            namespace="string",
            partition="string",
            request_headers=consul.ConfigEntryServiceSplitterSplitRequestHeadersArgs(
                add={
                    "string": "string",
                },
                removes=["string"],
                set={
                    "string": "string",
                },
            ),
            response_headers=consul.ConfigEntryServiceSplitterSplitResponseHeadersArgs(
                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

    The ConfigEntryServiceSplitter resource accepts the following input properties:

    Splits List<ConfigEntryServiceSplitterSplit>
    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 use in the FQDN when resolving the service.
    Partition string
    Specifies the admin partition to use in the FQDN when resolving the service.
    Splits []ConfigEntryServiceSplitterSplitArgs
    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 use in the FQDN when resolving the service.
    Partition string
    Specifies the admin partition to use in the FQDN when resolving the service.
    splits List<ConfigEntryServiceSplitterSplit>
    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 use in the FQDN when resolving the service.
    partition String
    Specifies the admin partition to use in the FQDN when resolving the service.
    splits ConfigEntryServiceSplitterSplit[]
    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 use in the FQDN when resolving the service.
    partition string
    Specifies the admin partition to use in the FQDN when resolving the service.
    splits Sequence[ConfigEntryServiceSplitterSplitArgs]
    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 use in the FQDN when resolving the service.
    partition str
    Specifies the admin partition to use in the FQDN when resolving the service.
    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 use in the FQDN when resolving the service.
    partition String
    Specifies the admin partition to use in the FQDN when resolving the service.

    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.
    The following state arguments are supported:
    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 use in the FQDN when resolving the service.
    Partition string
    Specifies the admin partition to use in the FQDN when resolving the service.
    Splits List<ConfigEntryServiceSplitterSplit>
    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 use in the FQDN when resolving the service.
    Partition string
    Specifies the admin partition to use in the FQDN when resolving the service.
    Splits []ConfigEntryServiceSplitterSplitArgs
    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 use in the FQDN when resolving the service.
    partition String
    Specifies the admin partition to use in the FQDN when resolving the service.
    splits List<ConfigEntryServiceSplitterSplit>
    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 use in the FQDN when resolving the service.
    partition string
    Specifies the admin partition to use in the FQDN when resolving the service.
    splits ConfigEntryServiceSplitterSplit[]
    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 use in the FQDN when resolving the service.
    partition str
    Specifies the admin partition to use in the FQDN when resolving the service.
    splits Sequence[ConfigEntryServiceSplitterSplitArgs]
    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 use in the FQDN when resolving the service.
    partition String
    Specifies the admin partition to use in the FQDN when resolving the service.
    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 between 0 and 100. The smallest representable value is .01. The sum of weights across all splits must add up to 100.
    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.
    RequestHeaders ConfigEntryServiceSplitterSplitRequestHeaders
    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.
    ResponseHeaders ConfigEntryServiceSplitterSplitResponseHeaders
    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.
    ServiceSubset 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 or canary. 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 between 0 and 100. The smallest representable value is .01. The sum of weights across all splits must add up to 100.
    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.
    RequestHeaders ConfigEntryServiceSplitterSplitRequestHeaders
    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.
    ResponseHeaders ConfigEntryServiceSplitterSplitResponseHeaders
    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.
    ServiceSubset 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 or canary. 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 between 0 and 100. The smallest representable value is .01. The sum of weights across all splits must add up to 100.
    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.
    requestHeaders ConfigEntryServiceSplitterSplitRequestHeaders
    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.
    responseHeaders ConfigEntryServiceSplitterSplitResponseHeaders
    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.
    serviceSubset 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 or canary. 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 between 0 and 100. The smallest representable value is .01. The sum of weights across all splits must add up to 100.
    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.
    requestHeaders ConfigEntryServiceSplitterSplitRequestHeaders
    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.
    responseHeaders ConfigEntryServiceSplitterSplitResponseHeaders
    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.
    serviceSubset 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 or canary. 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 between 0 and 100. The smallest representable value is .01. The sum of weights across all splits must add up to 100.
    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 ConfigEntryServiceSplitterSplitRequestHeaders
    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 ConfigEntryServiceSplitterSplitResponseHeaders
    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 or canary. 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 between 0 and 100. The smallest representable value is .01. The sum of weights across all splits must add up to 100.
    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.
    requestHeaders 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.
    responseHeaders 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.
    serviceSubset 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 or canary. 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.
    consul logo
    Consul v3.11.2 published on Thursday, Mar 21, 2024 by Pulumi