@pulumi/consul
Version:
A Pulumi package for creating and managing consul resources.
144 lines • 6.87 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConfigEntryServiceDefaults = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("./utilities"));
/**
* The `consul.ConfigEntryServiceDefaults` resource configures a [service defaults](https://developer.hashicorp.com/consul/docs/connect/config-entries/service-defaults) config entry that contains common configuration settings for service mesh services, such as upstreams and gateways.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as consul from "@pulumi/consul";
*
* const dashboard = new consul.ConfigEntryServiceDefaults("dashboard", {
* name: "dashboard",
* upstreamConfigs: [{
* defaults: {
* meshGateways: {
* mode: "local",
* },
* limits: {
* maxConnections: 512,
* maxPendingRequests: 512,
* maxConcurrentRequests: 512,
* },
* },
* overrides: [{
* name: "counting",
* meshGateways: [{
* mode: "remote",
* }],
* }],
* }],
* });
* ```
*/
class ConfigEntryServiceDefaults extends pulumi.CustomResource {
/**
* Get an existing ConfigEntryServiceDefaults resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, state, opts) {
return new ConfigEntryServiceDefaults(name, state, { ...opts, id: id });
}
/** @internal */
static __pulumiType = 'consul:index/configEntryServiceDefaults:ConfigEntryServiceDefaults';
/**
* Returns true if the given object is an instance of ConfigEntryServiceDefaults. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === ConfigEntryServiceDefaults.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["balanceInboundConnections"] = state?.balanceInboundConnections;
resourceInputs["destinations"] = state?.destinations;
resourceInputs["envoyExtensions"] = state?.envoyExtensions;
resourceInputs["exposes"] = state?.exposes;
resourceInputs["externalSni"] = state?.externalSni;
resourceInputs["localConnectTimeoutMs"] = state?.localConnectTimeoutMs;
resourceInputs["localRequestTimeoutMs"] = state?.localRequestTimeoutMs;
resourceInputs["maxInboundConnections"] = state?.maxInboundConnections;
resourceInputs["meshGateways"] = state?.meshGateways;
resourceInputs["meta"] = state?.meta;
resourceInputs["mode"] = state?.mode;
resourceInputs["mutualTlsMode"] = state?.mutualTlsMode;
resourceInputs["name"] = state?.name;
resourceInputs["namespace"] = state?.namespace;
resourceInputs["partition"] = state?.partition;
resourceInputs["protocol"] = state?.protocol;
resourceInputs["transparentProxies"] = state?.transparentProxies;
resourceInputs["upstreamConfigs"] = state?.upstreamConfigs;
}
else {
const args = argsOrState;
if (args?.exposes === undefined && !opts.urn) {
throw new Error("Missing required property 'exposes'");
}
if (args?.protocol === undefined && !opts.urn) {
throw new Error("Missing required property 'protocol'");
}
resourceInputs["balanceInboundConnections"] = args?.balanceInboundConnections;
resourceInputs["destinations"] = args?.destinations;
resourceInputs["envoyExtensions"] = args?.envoyExtensions;
resourceInputs["exposes"] = args?.exposes;
resourceInputs["externalSni"] = args?.externalSni;
resourceInputs["localConnectTimeoutMs"] = args?.localConnectTimeoutMs;
resourceInputs["localRequestTimeoutMs"] = args?.localRequestTimeoutMs;
resourceInputs["maxInboundConnections"] = args?.maxInboundConnections;
resourceInputs["meshGateways"] = args?.meshGateways;
resourceInputs["meta"] = args?.meta;
resourceInputs["mode"] = args?.mode;
resourceInputs["mutualTlsMode"] = args?.mutualTlsMode;
resourceInputs["name"] = args?.name;
resourceInputs["namespace"] = args?.namespace;
resourceInputs["partition"] = args?.partition;
resourceInputs["protocol"] = args?.protocol;
resourceInputs["transparentProxies"] = args?.transparentProxies;
resourceInputs["upstreamConfigs"] = args?.upstreamConfigs;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ConfigEntryServiceDefaults.__pulumiType, name, resourceInputs, opts);
}
}
exports.ConfigEntryServiceDefaults = ConfigEntryServiceDefaults;
//# sourceMappingURL=configEntryServiceDefaults.js.map