@pulumiverse/dynatrace
Version:
A Pulumi package for creating and managing Dynatrace cloud resources.
63 lines • 5.04 kB
JavaScript
;
// *** 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 dynatrace 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;
let resourceInputs = {};
opts = opts || {};
{
resourceInputs["accountId"] = (args === null || args === void 0 ? void 0 : args.accountId) ? pulumi.secret(args.accountId) : undefined;
resourceInputs["automationClientId"] = (args === null || args === void 0 ? void 0 : args.automationClientId) ? pulumi.secret(args.automationClientId) : undefined;
resourceInputs["automationClientSecret"] = (args === null || args === void 0 ? void 0 : args.automationClientSecret) ? pulumi.secret(args.automationClientSecret) : undefined;
resourceInputs["automationEnvUrl"] = args ? args.automationEnvUrl : undefined;
resourceInputs["automationTokenUrl"] = args ? args.automationTokenUrl : undefined;
resourceInputs["clientId"] = (args === null || args === void 0 ? void 0 : args.clientId) ? pulumi.secret(args.clientId) : undefined;
resourceInputs["clientSecret"] = (args === null || args === void 0 ? void 0 : args.clientSecret) ? pulumi.secret(args.clientSecret) : undefined;
resourceInputs["dtApiToken"] = (_a = ((args === null || args === void 0 ? void 0 : args.dtApiToken) ? pulumi.secret(args.dtApiToken) : undefined)) !== null && _a !== void 0 ? _a : utilities.getEnv("DYNATRACE_API_TOKEN", "DT_API_TOKEN");
resourceInputs["dtClusterApiToken"] = (_b = ((args === null || args === void 0 ? void 0 : args.dtClusterApiToken) ? pulumi.secret(args.dtClusterApiToken) : undefined)) !== null && _b !== void 0 ? _b : utilities.getEnv("DYNATRACE_CLUSTER_API_TOKEN", "DT_CLUSTER_API_TOKEN");
resourceInputs["dtClusterUrl"] = (_c = ((args === null || args === void 0 ? void 0 : args.dtClusterUrl) ? pulumi.secret(args.dtClusterUrl) : undefined)) !== null && _c !== void 0 ? _c : utilities.getEnv("DYNATRACE_CLUSTER_URL", "DT_CLUSTER_URL");
resourceInputs["dtEnvUrl"] = (_d = (args ? args.dtEnvUrl : undefined)) !== null && _d !== void 0 ? _d : utilities.getEnv("DYNATRACE_ENV_URL", "DT_ENV_URL");
resourceInputs["iamAccountId"] = (args === null || args === void 0 ? void 0 : args.iamAccountId) ? pulumi.secret(args.iamAccountId) : undefined;
resourceInputs["iamClientId"] = (args === null || args === void 0 ? void 0 : args.iamClientId) ? pulumi.secret(args.iamClientId) : undefined;
resourceInputs["iamClientSecret"] = (args === null || args === void 0 ? void 0 : args.iamClientSecret) ? pulumi.secret(args.iamClientSecret) : undefined;
resourceInputs["iamEndpointUrl"] = (args === null || args === void 0 ? void 0 : args.iamEndpointUrl) ? pulumi.secret(args.iamEndpointUrl) : undefined;
resourceInputs["iamTokenUrl"] = (args === null || args === void 0 ? void 0 : args.iamTokenUrl) ? pulumi.secret(args.iamTokenUrl) : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["accountId", "automationClientId", "automationClientSecret", "clientId", "clientSecret", "dtApiToken", "dtClusterApiToken", "dtClusterUrl", "iamAccountId", "iamClientId", "iamClientSecret", "iamEndpointUrl", "iamTokenUrl"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(Provider.__pulumiType, name, resourceInputs, opts);
}
}
exports.Provider = Provider;
/** @internal */
Provider.__pulumiType = 'dynatrace';
//# sourceMappingURL=provider.js.map