Kubernetes v4.19.0 published on Thursday, Dec 12, 2024 by Pulumi
kubernetes.kustomize/v2.Directory
Explore with Pulumi AI
Directory is a component representing a collection of resources described by a kustomize directory (kustomization).
Example Usage
Local Kustomize Directory
using System.Threading.Tasks;
using Pulumi;
using Pulumi.Kubernetes.Kustomize.V2;
class KustomizeStack : Stack
{
public KustomizeStack()
{
var helloWorld = new Directory("helloWorldLocal", new DirectoryArgs
{
Directory = "./helloWorld",
});
}
}
package main
import (
"github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/kustomize/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := kustomize.NewDirectory(ctx, "helloWorldLocal",
kustomize.DirectoryArgs{
Directory: pulumi.String("./helloWorld"),
},
)
if err != nil {
return err
}
return nil
})
}
package myproject;
import com.pulumi.Pulumi;
import com.pulumi.kubernetes.kustomize.v2.Directory;
import com.pulumi.kubernetes.kustomize.v2.DirectoryArgs;
public class App {
public static void main(String[] args) {
Pulumi.run(ctx -> {
var helloWorld = new Directory("helloWorldLocal", DirectoryArgs.builder()
.directory("./helloWorld")
.build());
});
}
}
from pulumi_kubernetes.kustomize.v2 import Directory
hello_world = Directory(
"hello-world-local",
directory="./helloWorld",
)
import * as k8s from "@pulumi/kubernetes";
const helloWorld = new k8s.kustomize.v2.Directory("helloWorldLocal", {
directory: "./helloWorld",
});
name: example
runtime: yaml
resources:
helloWorldLocal:
type: kubernetes:kustomize/v2:Directory
properties:
directory: ./helloWorld
Kustomize Directory from a Git Repo
using System.Threading.Tasks;
using Pulumi;
using Pulumi.Kubernetes.Kustomize.V2;
class KustomizeStack : Stack
{
public KustomizeStack()
{
var helloWorld = new Directory("helloWorldRemote", new DirectoryArgs
{
Directory = "https://github.com/kubernetes-sigs/kustomize/tree/v3.3.1/examples/helloWorld",
});
}
}
package main
import (
"github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/kustomize/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := kustomize.NewDirectory(ctx, "helloWorldRemote",
kustomize.DirectoryArgs{
Directory: pulumi.String("https://github.com/kubernetes-sigs/kustomize/tree/v3.3.1/examples/helloWorld"),
},
)
if err != nil {
return err
}
return nil
})
}
package myproject;
import com.pulumi.Pulumi;
import com.pulumi.kubernetes.kustomize.v2.Directory;
import com.pulumi.kubernetes.kustomize.v2.DirectoryArgs;
public class App {
public static void main(String[] args) {
Pulumi.run(ctx -> {
var helloWorld = new Directory("helloWorldRemote", DirectoryArgs.builder()
.directory("https://github.com/kubernetes-sigs/kustomize/tree/v3.3.1/examples/helloWorld")
.build());
});
}
}
from pulumi_kubernetes.kustomize.v2 import Directory
hello_world = Directory(
"hello-world-remote",
directory="https://github.com/kubernetes-sigs/kustomize/tree/v3.3.1/examples/helloWorld",
)
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",
});
name: example
runtime: yaml
resources:
helloWorldRemote:
type: kubernetes:kustomize/v2:Directory
properties:
directory: https://github.com/kubernetes-sigs/kustomize/tree/v3.3.1/examples/helloWorld
Create Directory Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Directory(name: string, args: Directory, opts?: ComponentResourceOptions);
@overload
def Directory(resource_name: str,
args: DirectoryArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Directory(resource_name: str,
opts: Optional[ResourceOptions] = None,
directory: Optional[str] = None,
namespace: Optional[str] = None,
resource_prefix: Optional[str] = None,
skip_await: Optional[bool] = None)
func NewDirectory(ctx *Context, name string, args DirectoryArgs, opts ...ResourceOption) (*Directory, error)
public Directory(string name, DirectoryArgs args, ComponentResourceOptions? opts = null)
public Directory(String name, DirectoryArgs args)
public Directory(String name, DirectoryArgs args, ComponentResourceOptions options)
type: kubernetes:kustomize/v2:Directory
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args Directory
- The arguments to resource properties.
- opts ComponentResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args DirectoryArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args DirectoryArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DirectoryArgs
- The arguments to resource properties.
- opts ComponentResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DirectoryArgs
- The arguments to resource properties.
- options ComponentResourceOptions
- Bag of options to control resource's behavior.
Directory Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Directory resource accepts the following input properties:
- Directory string
- The directory containing the kustomization to apply. The value can be a local directory or a folder in a git repository. Example: ./helloWorld Example: https://github.com/kubernetes-sigs/kustomize/tree/master/examples/helloWorld
- Namespace string
- The default namespace to apply to the resources. Defaults to the provider's namespace.
- Resource
Prefix string - A prefix for the auto-generated resource names. Defaults to the name of the Directory resource. Example: A resource created with resourcePrefix="foo" would produce a resource named "foo:resourceName".
- Skip
Await bool - Indicates that child resources should skip the await logic.
- Directory string
- The directory containing the kustomization to apply. The value can be a local directory or a folder in a git repository. Example: ./helloWorld Example: https://github.com/kubernetes-sigs/kustomize/tree/master/examples/helloWorld
- Namespace string
- The default namespace to apply to the resources. Defaults to the provider's namespace.
- Resource
Prefix string - A prefix for the auto-generated resource names. Defaults to the name of the Directory resource. Example: A resource created with resourcePrefix="foo" would produce a resource named "foo:resourceName".
- Skip
Await bool - Indicates that child resources should skip the await logic.
- directory String
- The directory containing the kustomization to apply. The value can be a local directory or a folder in a git repository. Example: ./helloWorld Example: https://github.com/kubernetes-sigs/kustomize/tree/master/examples/helloWorld
- namespace String
- The default namespace to apply to the resources. Defaults to the provider's namespace.
- resource
Prefix String - A prefix for the auto-generated resource names. Defaults to the name of the Directory resource. Example: A resource created with resourcePrefix="foo" would produce a resource named "foo:resourceName".
- skip
Await Boolean - Indicates that child resources should skip the await logic.
- directory string
- The directory containing the kustomization to apply. The value can be a local directory or a folder in a git repository. Example: ./helloWorld Example: https://github.com/kubernetes-sigs/kustomize/tree/master/examples/helloWorld
- namespace string
- The default namespace to apply to the resources. Defaults to the provider's namespace.
- resource
Prefix string - A prefix for the auto-generated resource names. Defaults to the name of the Directory resource. Example: A resource created with resourcePrefix="foo" would produce a resource named "foo:resourceName".
- skip
Await boolean - Indicates that child resources should skip the await logic.
- directory str
- The directory containing the kustomization to apply. The value can be a local directory or a folder in a git repository. Example: ./helloWorld Example: https://github.com/kubernetes-sigs/kustomize/tree/master/examples/helloWorld
- namespace str
- The default namespace to apply to the resources. Defaults to the provider's namespace.
- resource_
prefix str - A prefix for the auto-generated resource names. Defaults to the name of the Directory resource. Example: A resource created with resourcePrefix="foo" would produce a resource named "foo:resourceName".
- skip_
await bool - Indicates that child resources should skip the await logic.
- directory String
- The directory containing the kustomization to apply. The value can be a local directory or a folder in a git repository. Example: ./helloWorld Example: https://github.com/kubernetes-sigs/kustomize/tree/master/examples/helloWorld
- namespace String
- The default namespace to apply to the resources. Defaults to the provider's namespace.
- resource
Prefix String - A prefix for the auto-generated resource names. Defaults to the name of the Directory resource. Example: A resource created with resourcePrefix="foo" would produce a resource named "foo:resourceName".
- skip
Await Boolean - Indicates that child resources should skip the await logic.
Outputs
All input properties are implicitly available as output properties. Additionally, the Directory resource produces the following output properties:
- Resources string
- Resources created by the Directory resource.
- Resources string
- Resources created by the Directory resource.
- resources String
- Resources created by the Directory resource.
- resources string
- Resources created by the Directory resource.
- resources str
- Resources created by the Directory resource.
- resources String
- Resources created by the Directory resource.
Package Details
- Repository
- Kubernetes pulumi/pulumi-kubernetes
- License
- Apache-2.0