@pulumi/kubernetes
Version:
[](https://travis-ci.com/pulumi/pulumi-kubernetes) [](https://slack.pulumi.com) [![NPM
70 lines • 2.83 kB
JavaScript
;
// *** WARNING: this file was generated by pulumigen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.Directory = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = 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 {
/**
* 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 || args.directory === undefined) && !opts.urn) {
throw new Error("Missing required property 'directory'");
}
resourceInputs["directory"] = args ? args.directory : undefined;
resourceInputs["namespace"] = args ? args.namespace : undefined;
resourceInputs["resourcePrefix"] = args ? args.resourcePrefix : undefined;
resourceInputs["skipAwait"] = args ? args.skipAwait : undefined;
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;
/** @internal */
Directory.__pulumiType = 'kubernetes:kustomize/v2:Directory';
//# sourceMappingURL=directory.js.map