UNPKG

@pulumi/kubernetes

Version:

[![Actions Status](https://github.com/pulumi/pulumi-kubernetes/workflows/main/badge.svg)](https://github.com/pulumi/pulumi-kubernetes/actions) [![Slack](http://www.pulumi.com/images/docs/badges/slack.svg)](https://slack.pulumi.com) [![NPM version](https:/

93 lines 3.8 kB
"use strict"; // *** WARNING: this file was generated by pulumigen. *** // *** 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.Directory = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(require("../../utilities")); /** * Directory is a component representing a collection of resources described by a kustomize directory (kustomization). * * ## Example Usage * ### Local Kustomize Directory * ```typescript * import * as k8s from "@pulumi/kubernetes"; * * const helloWorld = new k8s.kustomize.v2.Directory("helloWorldLocal", { * directory: "./helloWorld", * }); * ``` * ### Kustomize Directory from a Git Repo * ```typescript * import * as k8s from "@pulumi/kubernetes"; * * const helloWorld = new k8s.kustomize.v2.Directory("helloWorldRemote", { * directory: "https://github.com/kubernetes-sigs/kustomize/tree/v3.3.1/examples/helloWorld", * }); * ``` */ class Directory extends pulumi.ComponentResource { /** @internal */ static __pulumiType = 'kubernetes:kustomize/v2:Directory'; /** * Returns true if the given object is an instance of Directory. 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'] === Directory.__pulumiType; } /** * Create a Directory 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) { let resourceInputs = {}; opts = opts || {}; if (!opts.id) { if (args?.directory === undefined && !opts.urn) { throw new Error("Missing required property 'directory'"); } resourceInputs["directory"] = args?.directory; resourceInputs["namespace"] = args?.namespace; resourceInputs["resourcePrefix"] = args?.resourcePrefix; resourceInputs["skipAwait"] = args?.skipAwait; resourceInputs["resources"] = undefined /*out*/; } else { resourceInputs["resources"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Directory.__pulumiType, name, resourceInputs, opts, true /*remote*/); } } exports.Directory = Directory; //# sourceMappingURL=directory.js.map