UNPKG

@lbrlabs/pulumi-grafana

Version:

A Pulumi package for creating and managing grafana.

64 lines 5.34 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.Provider = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * The provider type for the grafana package. By default, resources use package-wide configuration * settings, however an explicit `Provider` instance may be created and passed during resource * construction to achieve fine-grained programmatic control over provider settings. See the * [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information. */ class Provider extends pulumi.ProviderResource { /** * Returns true if the given object is an instance of Provider. 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'] === "pulumi:providers:" + Provider.__pulumiType; } /** * Create a Provider resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name, args, opts) { var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q; let resourceInputs = {}; opts = opts || {}; { resourceInputs["auth"] = (_a = ((args === null || args === void 0 ? void 0 : args.auth) ? pulumi.secret(args.auth) : undefined)) !== null && _a !== void 0 ? _a : utilities.getEnv("GRAFANA_AUTH"); resourceInputs["caCert"] = (_b = (args ? args.caCert : undefined)) !== null && _b !== void 0 ? _b : utilities.getEnv("GRAFANA_CA_CERT"); resourceInputs["cloudApiKey"] = (_c = ((args === null || args === void 0 ? void 0 : args.cloudApiKey) ? pulumi.secret(args.cloudApiKey) : undefined)) !== null && _c !== void 0 ? _c : utilities.getEnv("GRAFANA_CLOUD_API_KEY"); resourceInputs["cloudApiUrl"] = (_d = (args ? args.cloudApiUrl : undefined)) !== null && _d !== void 0 ? _d : utilities.getEnv("GRAFANA_CLOUD_API_URL"); resourceInputs["insecureSkipVerify"] = pulumi.output((_e = (args ? args.insecureSkipVerify : undefined)) !== null && _e !== void 0 ? _e : utilities.getEnvBoolean("GRAFANA_INSECURE_SKIP_VERIFY")).apply(JSON.stringify); resourceInputs["oncallAccessToken"] = (_f = ((args === null || args === void 0 ? void 0 : args.oncallAccessToken) ? pulumi.secret(args.oncallAccessToken) : undefined)) !== null && _f !== void 0 ? _f : utilities.getEnv("GRAFANA_ONCALL_ACCESS_TOKEN"); resourceInputs["oncallUrl"] = (_g = (args ? args.oncallUrl : undefined)) !== null && _g !== void 0 ? _g : utilities.getEnv("GRAFANA_ONCALL_URL"); resourceInputs["orgId"] = pulumi.output((_h = (args ? args.orgId : undefined)) !== null && _h !== void 0 ? _h : utilities.getEnvNumber("GRAFANA_ORG_ID")).apply(JSON.stringify); resourceInputs["retries"] = pulumi.output((_j = (args ? args.retries : undefined)) !== null && _j !== void 0 ? _j : utilities.getEnvNumber("GRAFANA_RETRIES")).apply(JSON.stringify); resourceInputs["retryStatusCodes"] = pulumi.output(args ? args.retryStatusCodes : undefined).apply(JSON.stringify); resourceInputs["retryWait"] = pulumi.output(args ? args.retryWait : undefined).apply(JSON.stringify); resourceInputs["smAccessToken"] = (_k = ((args === null || args === void 0 ? void 0 : args.smAccessToken) ? pulumi.secret(args.smAccessToken) : undefined)) !== null && _k !== void 0 ? _k : utilities.getEnv("GRAFANA_SM_ACCESS_TOKEN"); resourceInputs["smUrl"] = (_l = (args ? args.smUrl : undefined)) !== null && _l !== void 0 ? _l : utilities.getEnv("GRAFANA_SM_URL"); resourceInputs["storeDashboardSha256"] = pulumi.output((_m = (args ? args.storeDashboardSha256 : undefined)) !== null && _m !== void 0 ? _m : utilities.getEnvBoolean("GRAFANA_STORE_DASHBOARD_SHA256")).apply(JSON.stringify); resourceInputs["tlsCert"] = (_o = (args ? args.tlsCert : undefined)) !== null && _o !== void 0 ? _o : utilities.getEnv("GRAFANA_TLS_CERT"); resourceInputs["tlsKey"] = (_p = ((args === null || args === void 0 ? void 0 : args.tlsKey) ? pulumi.secret(args.tlsKey) : undefined)) !== null && _p !== void 0 ? _p : utilities.getEnv("GRAFANA_TLS_KEY"); resourceInputs["url"] = (_q = (args ? args.url : undefined)) !== null && _q !== void 0 ? _q : utilities.getEnv("GRAFANA_URL"); } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["auth", "cloudApiKey", "oncallAccessToken", "smAccessToken", "tlsKey"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(Provider.__pulumiType, name, resourceInputs, opts); } } exports.Provider = Provider; /** @internal */ Provider.__pulumiType = 'grafana'; //# sourceMappingURL=provider.js.map