consul.ConfigEntry

Explore with Pulumi AI

Import

consul_config_entry can be imported using the syntax <kind>/<name> if the config entry is in the default partition and default namespace, or <partition>/<namespace>/<kind>/<name> for config entries in a non-default partition or namespace

 $ pulumi import consul:index/configEntry:ConfigEntry service_splitter 816a195f-6cb1-2e8d-92af-3011ae706318

Example Usage

using System.Collections.Generic;
using System.Text.Json;
using Pulumi;
using Consul = Pulumi.Consul;

class MyStack : Stack
{
    public MyStack()
    {
        var proxyDefaults = new Consul.ConfigEntry("proxyDefaults", new Consul.ConfigEntryArgs
        {
            Kind = "proxy-defaults",
            ConfigJson = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                { "Config", new Dictionary<string, object?>
                {
                    { "local_connect_timeout_ms", 1000 },
                    { "handshake_timeout_ms", 10000 },
                } },
            }),
        });
        var web = new Consul.ConfigEntry("web", new Consul.ConfigEntryArgs
        {
            Kind = "service-defaults",
            ConfigJson = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                { "Protocol", "http" },
            }),
        });
        var admin = new Consul.ConfigEntry("admin", new Consul.ConfigEntryArgs
        {
            Kind = "service-defaults",
            ConfigJson = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                { "Protocol", "http" },
            }),
        });
        var serviceResolver = new Consul.ConfigEntry("serviceResolver", new Consul.ConfigEntryArgs
        {
            Kind = "service-resolver",
            ConfigJson = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                { "DefaultSubset", "v1" },
                { "Subsets", new Dictionary<string, object?>
                {
                    { "v1", new Dictionary<string, object?>
                    {
                        { "Filter", "Service.Meta.version == v1" },
                    } },
                    { "v2", new Dictionary<string, object?>
                    {
                        { "Filter", "Service.Meta.version == v2" },
                    } },
                } },
            }),
        });
        var serviceSplitter = new Consul.ConfigEntry("serviceSplitter", new Consul.ConfigEntryArgs
        {
            Kind = "service-splitter",
            ConfigJson = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                { "Splits", new[]
                    {
                        new Dictionary<string, object?>
                        {
                            { "Weight", 90 },
                            { "ServiceSubset", "v1" },
                        },
                        new Dictionary<string, object?>
                        {
                            { "Weight", 10 },
                            { "ServiceSubset", "v2" },
                        },
                    }
                 },
            }),
        });
        var serviceRouter = new Consul.ConfigEntry("serviceRouter", new Consul.ConfigEntryArgs
        {
            Kind = "service-router",
            ConfigJson = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                { "Routes", new[]
                    {
                        new Dictionary<string, object?>
                        {
                            { "Match", new Dictionary<string, object?>
                            {
                                { "HTTP", new Dictionary<string, object?>
                                {
                                    { "PathPrefix", "/admin" },
                                } },
                            } },
                            { "Destination", new Dictionary<string, object?>
                            {
                                { "Service", "admin" },
                            } },
                        },
                    }
                 },
            }),
        });
        var ingressGateway = new Consul.ConfigEntry("ingressGateway", new Consul.ConfigEntryArgs
        {
            Kind = "ingress-gateway",
            ConfigJson = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                { "TLS", new Dictionary<string, object?>
                {
                    { "Enabled", true },
                } },
                { "Listeners", new[]
                    {
                        new Dictionary<string, object?>
                        {
                            { "Port", 8000 },
                            { "Protocol", "http" },
                            { "Services", new[]
                                {
                                    new Dictionary<string, object?>
                                    {
                                        { "Name", "*" },
                                    },
                                }
                             },
                        },
                    }
                 },
            }),
        });
        var terminatingGateway = new Consul.ConfigEntry("terminatingGateway", new Consul.ConfigEntryArgs
        {
            Kind = "terminating-gateway",
            ConfigJson = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                { "Services", new[]
                    {
                        new Dictionary<string, object?>
                        {
                            { "Name", "billing" },
                        },
                    }
                 },
            }),
        });
    }

}
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{}{
			"Config": map[string]interface{}{
				"local_connect_timeout_ms": 1000,
				"handshake_timeout_ms":     10000,
			},
		})
		if err != nil {
			return err
		}
		json0 := string(tmpJSON0)
		_, err := consul.NewConfigEntry(ctx, "proxyDefaults", &consul.ConfigEntryArgs{
			Kind:       pulumi.String("proxy-defaults"),
			ConfigJson: pulumi.String(json0),
		})
		if err != nil {
			return err
		}
		tmpJSON1, err := json.Marshal(map[string]interface{}{
			"Protocol": "http",
		})
		if err != nil {
			return err
		}
		json1 := string(tmpJSON1)
		_, err = consul.NewConfigEntry(ctx, "web", &consul.ConfigEntryArgs{
			Kind:       pulumi.String("service-defaults"),
			ConfigJson: pulumi.String(json1),
		})
		if err != nil {
			return err
		}
		tmpJSON2, err := json.Marshal(map[string]interface{}{
			"Protocol": "http",
		})
		if err != nil {
			return err
		}
		json2 := string(tmpJSON2)
		_, err = consul.NewConfigEntry(ctx, "admin", &consul.ConfigEntryArgs{
			Kind:       pulumi.String("service-defaults"),
			ConfigJson: pulumi.String(json2),
		})
		if err != nil {
			return err
		}
		tmpJSON3, err := json.Marshal(map[string]interface{}{
			"DefaultSubset": "v1",
			"Subsets": map[string]interface{}{
				"v1": map[string]interface{}{
					"Filter": "Service.Meta.version == v1",
				},
				"v2": map[string]interface{}{
					"Filter": "Service.Meta.version == v2",
				},
			},
		})
		if err != nil {
			return err
		}
		json3 := string(tmpJSON3)
		_, err = consul.NewConfigEntry(ctx, "serviceResolver", &consul.ConfigEntryArgs{
			Kind:       pulumi.String("service-resolver"),
			ConfigJson: pulumi.String(json3),
		})
		if err != nil {
			return err
		}
		tmpJSON4, err := json.Marshal(map[string]interface{}{
			"Splits": []interface{}{
				map[string]interface{}{
					"Weight":        90,
					"ServiceSubset": "v1",
				},
				map[string]interface{}{
					"Weight":        10,
					"ServiceSubset": "v2",
				},
			},
		})
		if err != nil {
			return err
		}
		json4 := string(tmpJSON4)
		_, err = consul.NewConfigEntry(ctx, "serviceSplitter", &consul.ConfigEntryArgs{
			Kind:       pulumi.String("service-splitter"),
			ConfigJson: pulumi.String(json4),
		})
		if err != nil {
			return err
		}
		tmpJSON5, err := json.Marshal(map[string]interface{}{
			"Routes": []map[string]interface{}{
				map[string]interface{}{
					"Match": map[string]interface{}{
						"HTTP": map[string]interface{}{
							"PathPrefix": "/admin",
						},
					},
					"Destination": map[string]interface{}{
						"Service": "admin",
					},
				},
			},
		})
		if err != nil {
			return err
		}
		json5 := string(tmpJSON5)
		_, err = consul.NewConfigEntry(ctx, "serviceRouter", &consul.ConfigEntryArgs{
			Kind:       pulumi.String("service-router"),
			ConfigJson: pulumi.String(json5),
		})
		if err != nil {
			return err
		}
		tmpJSON6, err := json.Marshal(map[string]interface{}{
			"TLS": map[string]interface{}{
				"Enabled": true,
			},
			"Listeners": []map[string]interface{}{
				map[string]interface{}{
					"Port":     8000,
					"Protocol": "http",
					"Services": []map[string]interface{}{
						map[string]interface{}{
							"Name": "*",
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		json6 := string(tmpJSON6)
		_, err = consul.NewConfigEntry(ctx, "ingressGateway", &consul.ConfigEntryArgs{
			Kind:       pulumi.String("ingress-gateway"),
			ConfigJson: pulumi.String(json6),
		})
		if err != nil {
			return err
		}
		tmpJSON7, err := json.Marshal(map[string]interface{}{
			"Services": []map[string]interface{}{
				map[string]interface{}{
					"Name": "billing",
				},
			},
		})
		if err != nil {
			return err
		}
		json7 := string(tmpJSON7)
		_, err = consul.NewConfigEntry(ctx, "terminatingGateway", &consul.ConfigEntryArgs{
			Kind:       pulumi.String("terminating-gateway"),
			ConfigJson: pulumi.String(json7),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import json
import pulumi_consul as consul

proxy_defaults = consul.ConfigEntry("proxyDefaults",
    kind="proxy-defaults",
    config_json=json.dumps({
        "Config": {
            "local_connect_timeout_ms": 1000,
            "handshake_timeout_ms": 10000,
        },
    }))
web = consul.ConfigEntry("web",
    kind="service-defaults",
    config_json=json.dumps({
        "Protocol": "http",
    }))
admin = consul.ConfigEntry("admin",
    kind="service-defaults",
    config_json=json.dumps({
        "Protocol": "http",
    }))
service_resolver = consul.ConfigEntry("serviceResolver",
    kind="service-resolver",
    config_json=json.dumps({
        "DefaultSubset": "v1",
        "Subsets": {
            "v1": {
                "Filter": "Service.Meta.version == v1",
            },
            "v2": {
                "Filter": "Service.Meta.version == v2",
            },
        },
    }))
service_splitter = consul.ConfigEntry("serviceSplitter",
    kind="service-splitter",
    config_json=json.dumps({
        "Splits": [
            {
                "Weight": 90,
                "ServiceSubset": "v1",
            },
            {
                "Weight": 10,
                "ServiceSubset": "v2",
            },
        ],
    }))
service_router = consul.ConfigEntry("serviceRouter",
    kind="service-router",
    config_json=json.dumps({
        "Routes": [{
            "Match": {
                "HTTP": {
                    "PathPrefix": "/admin",
                },
            },
            "Destination": {
                "Service": "admin",
            },
        }],
    }))
ingress_gateway = consul.ConfigEntry("ingressGateway",
    kind="ingress-gateway",
    config_json=json.dumps({
        "TLS": {
            "Enabled": True,
        },
        "Listeners": [{
            "Port": 8000,
            "Protocol": "http",
            "Services": [{
                "Name": "*",
            }],
        }],
    }))
terminating_gateway = consul.ConfigEntry("terminatingGateway",
    kind="terminating-gateway",
    config_json=json.dumps({
        "Services": [{
            "Name": "billing",
        }],
    }))
import * as pulumi from "@pulumi/pulumi";
import * as consul from "@pulumi/consul";

const proxyDefaults = new consul.ConfigEntry("proxyDefaults", {
    kind: "proxy-defaults",
    configJson: JSON.stringify({
        Config: {
            local_connect_timeout_ms: 1000,
            handshake_timeout_ms: 10000,
        },
    }),
});
const web = new consul.ConfigEntry("web", {
    kind: "service-defaults",
    configJson: JSON.stringify({
        Protocol: "http",
    }),
});
const admin = new consul.ConfigEntry("admin", {
    kind: "service-defaults",
    configJson: JSON.stringify({
        Protocol: "http",
    }),
});
const serviceResolver = new consul.ConfigEntry("serviceResolver", {
    kind: "service-resolver",
    configJson: JSON.stringify({
        DefaultSubset: "v1",
        Subsets: {
            v1: {
                Filter: "Service.Meta.version == v1",
            },
            v2: {
                Filter: "Service.Meta.version == v2",
            },
        },
    }),
});
const serviceSplitter = new consul.ConfigEntry("serviceSplitter", {
    kind: "service-splitter",
    configJson: JSON.stringify({
        Splits: [
            {
                Weight: 90,
                ServiceSubset: "v1",
            },
            {
                Weight: 10,
                ServiceSubset: "v2",
            },
        ],
    }),
});
const serviceRouter = new consul.ConfigEntry("serviceRouter", {
    kind: "service-router",
    configJson: JSON.stringify({
        Routes: [{
            Match: {
                HTTP: {
                    PathPrefix: "/admin",
                },
            },
            Destination: {
                Service: "admin",
            },
        }],
    }),
});
const ingressGateway = new consul.ConfigEntry("ingressGateway", {
    kind: "ingress-gateway",
    configJson: JSON.stringify({
        TLS: {
            Enabled: true,
        },
        Listeners: [{
            Port: 8000,
            Protocol: "http",
            Services: [{
                Name: "*",
            }],
        }],
    }),
});
const terminatingGateway = new consul.ConfigEntry("terminatingGateway", {
    kind: "terminating-gateway",
    configJson: JSON.stringify({
        Services: [{
            Name: "billing",
        }],
    }),
});

Coming soon!

service-intentions config entry

using System.Collections.Generic;
using System.Text.Json;
using Pulumi;
using Consul = Pulumi.Consul;

class MyStack : Stack
{
    public MyStack()
    {
        var serviceIntentions = new Consul.ConfigEntry("serviceIntentions", new Consul.ConfigEntryArgs
        {
            Kind = "service-intentions",
            ConfigJson = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                { "Sources", new[]
                    {
                        new Dictionary<string, object?>
                        {
                            { "Action", "allow" },
                            { "Name", "frontend-webapp" },
                            { "Precedence", 9 },
                            { "Type", "consul" },
                        },
                        new Dictionary<string, object?>
                        {
                            { "Action", "allow" },
                            { "Name", "nightly-cronjob" },
                            { "Precedence", 9 },
                            { "Type", "consul" },
                        },
                    }
                 },
            }),
        });
    }

}
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{}{
			"Sources": []map[string]interface{}{
				map[string]interface{}{
					"Action":     "allow",
					"Name":       "frontend-webapp",
					"Precedence": 9,
					"Type":       "consul",
				},
				map[string]interface{}{
					"Action":     "allow",
					"Name":       "nightly-cronjob",
					"Precedence": 9,
					"Type":       "consul",
				},
			},
		})
		if err != nil {
			return err
		}
		json0 := string(tmpJSON0)
		_, err := consul.NewConfigEntry(ctx, "serviceIntentions", &consul.ConfigEntryArgs{
			Kind:       pulumi.String("service-intentions"),
			ConfigJson: pulumi.String(json0),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import json
import pulumi_consul as consul

service_intentions = consul.ConfigEntry("serviceIntentions",
    kind="service-intentions",
    config_json=json.dumps({
        "Sources": [
            {
                "Action": "allow",
                "Name": "frontend-webapp",
                "Precedence": 9,
                "Type": "consul",
            },
            {
                "Action": "allow",
                "Name": "nightly-cronjob",
                "Precedence": 9,
                "Type": "consul",
            },
        ],
    }))
import * as pulumi from "@pulumi/pulumi";
import * as consul from "@pulumi/consul";

const serviceIntentions = new consul.ConfigEntry("serviceIntentions", {
    kind: "service-intentions",
    configJson: JSON.stringify({
        Sources: [
            {
                Action: "allow",
                Name: "frontend-webapp",
                Precedence: 9,
                Type: "consul",
            },
            {
                Action: "allow",
                Name: "nightly-cronjob",
                Precedence: 9,
                Type: "consul",
            },
        ],
    }),
});

Coming soon!

using System.Collections.Generic;
using System.Text.Json;
using Pulumi;
using Consul = Pulumi.Consul;

class MyStack : Stack
{
    public MyStack()
    {
        var sd = new Consul.ConfigEntry("sd", new Consul.ConfigEntryArgs
        {
            Kind = "service-defaults",
            ConfigJson = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                { "Protocol", "http" },
            }),
        });
        var serviceIntentions = new Consul.ConfigEntry("serviceIntentions", new Consul.ConfigEntryArgs
        {
            Kind = "service-intentions",
            ConfigJson = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                { "Sources", new[]
                    {
                        new Dictionary<string, object?>
                        {
                            { "Name", "contractor-webapp" },
                            { "Permissions", new[]
                                {
                                    new Dictionary<string, object?>
                                    {
                                        { "Action", "allow" },
                                        { "HTTP", new Dictionary<string, object?>
                                        {
                                            { "Methods", new[]
                                                {
                                                    "GET",
                                                    "HEAD",
                                                }
                                             },
                                            { "PathExact", "/healtz" },
                                        } },
                                    },
                                }
                             },
                            { "Precedence", 9 },
                            { "Type", "consul" },
                        },
                        new Dictionary<string, object?>
                        {
                            { "Name", "admin-dashboard-webapp" },
                            { "Permissions", new[]
                                {
                                    new Dictionary<string, object?>
                                    {
                                        { "Action", "deny" },
                                        { "HTTP", new Dictionary<string, object?>
                                        {
                                            { "PathPrefix", "/debugz" },
                                        } },
                                    },
                                    new Dictionary<string, object?>
                                    {
                                        { "Action", "allow" },
                                        { "HTTP", new Dictionary<string, object?>
                                        {
                                            { "PathPrefix", "/" },
                                        } },
                                    },
                                }
                             },
                            { "Precedence", 9 },
                            { "Type", "consul" },
                        },
                    }
                 },
            }),
        });
    }

}
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",
		})
		if err != nil {
			return err
		}
		json0 := string(tmpJSON0)
		_, err := consul.NewConfigEntry(ctx, "sd", &consul.ConfigEntryArgs{
			Kind:       pulumi.String("service-defaults"),
			ConfigJson: pulumi.String(json0),
		})
		if err != nil {
			return err
		}
		tmpJSON1, err := json.Marshal(map[string]interface{}{
			"Sources": []interface{}{
				map[string]interface{}{
					"Name": "contractor-webapp",
					"Permissions": []map[string]interface{}{
						map[string]interface{}{
							"Action": "allow",
							"HTTP": map[string]interface{}{
								"Methods": []string{
									"GET",
									"HEAD",
								},
								"PathExact": "/healtz",
							},
						},
					},
					"Precedence": 9,
					"Type":       "consul",
				},
				map[string]interface{}{
					"Name": "admin-dashboard-webapp",
					"Permissions": []map[string]interface{}{
						map[string]interface{}{
							"Action": "deny",
							"HTTP": map[string]interface{}{
								"PathPrefix": "/debugz",
							},
						},
						map[string]interface{}{
							"Action": "allow",
							"HTTP": map[string]interface{}{
								"PathPrefix": "/",
							},
						},
					},
					"Precedence": 9,
					"Type":       "consul",
				},
			},
		})
		if err != nil {
			return err
		}
		json1 := string(tmpJSON1)
		_, err = consul.NewConfigEntry(ctx, "serviceIntentions", &consul.ConfigEntryArgs{
			Kind:       pulumi.String("service-intentions"),
			ConfigJson: pulumi.String(json1),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import json
import pulumi_consul as consul

sd = consul.ConfigEntry("sd",
    kind="service-defaults",
    config_json=json.dumps({
        "Protocol": "http",
    }))
service_intentions = consul.ConfigEntry("serviceIntentions",
    kind="service-intentions",
    config_json=json.dumps({
        "Sources": [
            {
                "Name": "contractor-webapp",
                "Permissions": [{
                    "Action": "allow",
                    "HTTP": {
                        "Methods": [
                            "GET",
                            "HEAD",
                        ],
                        "PathExact": "/healtz",
                    },
                }],
                "Precedence": 9,
                "Type": "consul",
            },
            {
                "Name": "admin-dashboard-webapp",
                "Permissions": [
                    {
                        "Action": "deny",
                        "HTTP": {
                            "PathPrefix": "/debugz",
                        },
                    },
                    {
                        "Action": "allow",
                        "HTTP": {
                            "PathPrefix": "/",
                        },
                    },
                ],
                "Precedence": 9,
                "Type": "consul",
            },
        ],
    }))
import * as pulumi from "@pulumi/pulumi";
import * as consul from "@pulumi/consul";

const sd = new consul.ConfigEntry("sd", {
    kind: "service-defaults",
    configJson: JSON.stringify({
        Protocol: "http",
    }),
});
const serviceIntentions = new consul.ConfigEntry("serviceIntentions", {
    kind: "service-intentions",
    configJson: JSON.stringify({
        Sources: [
            {
                Name: "contractor-webapp",
                Permissions: [{
                    Action: "allow",
                    HTTP: {
                        Methods: [
                            "GET",
                            "HEAD",
                        ],
                        PathExact: "/healtz",
                    },
                }],
                Precedence: 9,
                Type: "consul",
            },
            {
                Name: "admin-dashboard-webapp",
                Permissions: [
                    {
                        Action: "deny",
                        HTTP: {
                            PathPrefix: "/debugz",
                        },
                    },
                    {
                        Action: "allow",
                        HTTP: {
                            PathPrefix: "/",
                        },
                    },
                ],
                Precedence: 9,
                Type: "consul",
            },
        ],
    }),
});

Coming soon!

exported-services config entry

using System.Collections.Generic;
using System.Text.Json;
using Pulumi;
using Consul = Pulumi.Consul;

class MyStack : Stack
{
    public MyStack()
    {
        var exportedServices = new Consul.ConfigEntry("exportedServices", new Consul.ConfigEntryArgs
        {
            Kind = "exported-services",
            ConfigJson = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                { "Services", new[]
                    {
                        new Dictionary<string, object?>
                        {
                            { "Name", "test" },
                            { "Namespace", "default" },
                            { "Consumers", new[]
                                {
                                    new Dictionary<string, object?>
                                    {
                                        { "Partition", "default" },
                                    },
                                }
                             },
                        },
                    }
                 },
            }),
        });
    }

}
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{}{
			"Services": []map[string]interface{}{
				map[string]interface{}{
					"Name":      "test",
					"Namespace": "default",
					"Consumers": []map[string]interface{}{
						map[string]interface{}{
							"Partition": "default",
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		json0 := string(tmpJSON0)
		_, err := consul.NewConfigEntry(ctx, "exportedServices", &consul.ConfigEntryArgs{
			Kind:       pulumi.String("exported-services"),
			ConfigJson: pulumi.String(json0),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import json
import pulumi_consul as consul

exported_services = consul.ConfigEntry("exportedServices",
    kind="exported-services",
    config_json=json.dumps({
        "Services": [{
            "Name": "test",
            "Namespace": "default",
            "Consumers": [{
                "Partition": "default",
            }],
        }],
    }))
import * as pulumi from "@pulumi/pulumi";
import * as consul from "@pulumi/consul";

const exportedServices = new consul.ConfigEntry("exportedServices", {
    kind: "exported-services",
    configJson: JSON.stringify({
        Services: [{
            Name: "test",
            Namespace: "default",
            Consumers: [{
                Partition: "default",
            }],
        }],
    }),
});

Coming soon!

mesh config entry

using System.Collections.Generic;
using System.Text.Json;
using Pulumi;
using Consul = Pulumi.Consul;

class MyStack : Stack
{
    public MyStack()
    {
        var mesh = new Consul.ConfigEntry("mesh", new Consul.ConfigEntryArgs
        {
            Kind = "mesh",
            Partition = "default",
            ConfigJson = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                { "TransparentProxy", new Dictionary<string, object?>
                {
                    { "MeshDestinationsOnly", true },
                } },
            }),
        });
    }

}
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{}{
			"TransparentProxy": map[string]interface{}{
				"MeshDestinationsOnly": true,
			},
		})
		if err != nil {
			return err
		}
		json0 := string(tmpJSON0)
		_, err := consul.NewConfigEntry(ctx, "mesh", &consul.ConfigEntryArgs{
			Kind:       pulumi.String("mesh"),
			Partition:  pulumi.String("default"),
			ConfigJson: pulumi.String(json0),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import json
import pulumi_consul as consul

mesh = consul.ConfigEntry("mesh",
    kind="mesh",
    partition="default",
    config_json=json.dumps({
        "TransparentProxy": {
            "MeshDestinationsOnly": True,
        },
    }))
import * as pulumi from "@pulumi/pulumi";
import * as consul from "@pulumi/consul";

const mesh = new consul.ConfigEntry("mesh", {
    kind: "mesh",
    partition: "default",
    configJson: JSON.stringify({
        TransparentProxy: {
            MeshDestinationsOnly: true,
        },
    }),
});

Coming soon!

Create ConfigEntry Resource

new ConfigEntry(name: string, args: ConfigEntryArgs, opts?: CustomResourceOptions);
@overload
def ConfigEntry(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                config_json: Optional[str] = None,
                kind: Optional[str] = None,
                name: Optional[str] = None,
                namespace: Optional[str] = None,
                partition: Optional[str] = None)
@overload
def ConfigEntry(resource_name: str,
                args: ConfigEntryArgs,
                opts: Optional[ResourceOptions] = None)
func NewConfigEntry(ctx *Context, name string, args ConfigEntryArgs, opts ...ResourceOption) (*ConfigEntry, error)
public ConfigEntry(string name, ConfigEntryArgs args, CustomResourceOptions? opts = null)
public ConfigEntry(String name, ConfigEntryArgs args)
public ConfigEntry(String name, ConfigEntryArgs args, CustomResourceOptions options)
type: consul:ConfigEntry
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args ConfigEntryArgs
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 ConfigEntryArgs
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 ConfigEntryArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ConfigEntryArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args ConfigEntryArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

Kind string

The kind of configuration entry to register.

ConfigJson string

An arbitrary map of configuration values.

Name string

The name of the configuration entry being registered.

Namespace string

The namespace to create the config entry within.

Partition string

The partition the config entry is associated with.

Kind string

The kind of configuration entry to register.

ConfigJson string

An arbitrary map of configuration values.

Name string

The name of the configuration entry being registered.

Namespace string

The namespace to create the config entry within.

Partition string

The partition the config entry is associated with.

kind String

The kind of configuration entry to register.

configJson String

An arbitrary map of configuration values.

name String

The name of the configuration entry being registered.

namespace String

The namespace to create the config entry within.

partition String

The partition the config entry is associated with.

kind string

The kind of configuration entry to register.

configJson string

An arbitrary map of configuration values.

name string

The name of the configuration entry being registered.

namespace string

The namespace to create the config entry within.

partition string

The partition the config entry is associated with.

kind str

The kind of configuration entry to register.

config_json str

An arbitrary map of configuration values.

name str

The name of the configuration entry being registered.

namespace str

The namespace to create the config entry within.

partition str

The partition the config entry is associated with.

kind String

The kind of configuration entry to register.

configJson String

An arbitrary map of configuration values.

name String

The name of the configuration entry being registered.

namespace String

The namespace to create the config entry within.

partition String

The partition the config entry is associated with.

Outputs

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

Get an existing ConfigEntry 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?: ConfigEntryState, opts?: CustomResourceOptions): ConfigEntry
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        config_json: Optional[str] = None,
        kind: Optional[str] = None,
        name: Optional[str] = None,
        namespace: Optional[str] = None,
        partition: Optional[str] = None) -> ConfigEntry
func GetConfigEntry(ctx *Context, name string, id IDInput, state *ConfigEntryState, opts ...ResourceOption) (*ConfigEntry, error)
public static ConfigEntry Get(string name, Input<string> id, ConfigEntryState? state, CustomResourceOptions? opts = null)
public static ConfigEntry get(String name, Output<String> id, ConfigEntryState 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:
ConfigJson string

An arbitrary map of configuration values.

Kind string

The kind of configuration entry to register.

Name string

The name of the configuration entry being registered.

Namespace string

The namespace to create the config entry within.

Partition string

The partition the config entry is associated with.

ConfigJson string

An arbitrary map of configuration values.

Kind string

The kind of configuration entry to register.

Name string

The name of the configuration entry being registered.

Namespace string

The namespace to create the config entry within.

Partition string

The partition the config entry is associated with.

configJson String

An arbitrary map of configuration values.

kind String

The kind of configuration entry to register.

name String

The name of the configuration entry being registered.

namespace String

The namespace to create the config entry within.

partition String

The partition the config entry is associated with.

configJson string

An arbitrary map of configuration values.

kind string

The kind of configuration entry to register.

name string

The name of the configuration entry being registered.

namespace string

The namespace to create the config entry within.

partition string

The partition the config entry is associated with.

config_json str

An arbitrary map of configuration values.

kind str

The kind of configuration entry to register.

name str

The name of the configuration entry being registered.

namespace str

The namespace to create the config entry within.

partition str

The partition the config entry is associated with.

configJson String

An arbitrary map of configuration values.

kind String

The kind of configuration entry to register.

name String

The name of the configuration entry being registered.

namespace String

The namespace to create the config entry within.

partition String

The partition the config entry is associated with.

Package Details

Repository
HashiCorp Consul pulumi/pulumi-consul
License
Apache-2.0
Notes

This Pulumi package is based on the consul Terraform Provider.