UNPKG

@pulumi/tailscale

Version:

A Pulumi package for creating and managing Tailscale cloud resources.

88 lines 3.95 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.PostureIntegration = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * The postureIntegration resource allows you to manage integrations with device posture data providers. See https://tailscale.com/kb/1288/device-posture for more information. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as tailscale from "@pulumi/tailscale"; * * const samplePostureIntegration = new tailscale.PostureIntegration("sample_posture_integration", { * postureProvider: "falcon", * cloudId: "us-1", * clientId: "clientid1", * clientSecret: "test-secret1", * }); * ``` * * ## Import * * Posture integration can be imported using the posture integration id, e.g., * * ```sh * $ pulumi import tailscale:index/postureIntegration:PostureIntegration sample_posture_integration 123456789 * ``` */ class PostureIntegration extends pulumi.CustomResource { /** * Get an existing PostureIntegration 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 PostureIntegration(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of PostureIntegration. 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'] === PostureIntegration.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["clientId"] = state ? state.clientId : undefined; resourceInputs["clientSecret"] = state ? state.clientSecret : undefined; resourceInputs["cloudId"] = state ? state.cloudId : undefined; resourceInputs["postureProvider"] = state ? state.postureProvider : undefined; resourceInputs["tenantId"] = state ? state.tenantId : undefined; } else { const args = argsOrState; if ((!args || args.clientSecret === undefined) && !opts.urn) { throw new Error("Missing required property 'clientSecret'"); } if ((!args || args.postureProvider === undefined) && !opts.urn) { throw new Error("Missing required property 'postureProvider'"); } resourceInputs["clientId"] = args ? args.clientId : undefined; resourceInputs["clientSecret"] = args ? args.clientSecret : undefined; resourceInputs["cloudId"] = args ? args.cloudId : undefined; resourceInputs["postureProvider"] = args ? args.postureProvider : undefined; resourceInputs["tenantId"] = args ? args.tenantId : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(PostureIntegration.__pulumiType, name, resourceInputs, opts); } } exports.PostureIntegration = PostureIntegration; /** @internal */ PostureIntegration.__pulumiType = 'tailscale:index/postureIntegration:PostureIntegration'; //# sourceMappingURL=postureIntegration.js.map