Get started with Pulumi in a free one hour introductory workshop. Register Now

Module yaml

This page documents the language specification for the kubernetes package. If you're looking for help working with the inputs, outputs, or functions of kubernetes resources in a Pulumi program, please see the resource documentation for examples and API reference.

Resources

Others

Resources

Resource CollectionComponentResource

class CollectionComponentResource extends ComponentResource

constructor

protected new CollectionComponentResource(resourceType: string, name: string, config: any, opts?: pulumi.ComponentResourceOptions)

method getCustomResource

public getCustomResource<T>(groupVersionKind: string, namespace: string): pulumi.Output<T>

getCustomResource returns a resource defined by a CRD with the given group/version/kind and name.

For example: getCustomResource(“monitoring.coreos.com/v1/ServiceMonitor”, “kube-prometheus-exporter-kubernetes”)

public getCustomResource<T>(groupVersionKind: string, namespace: string, name: string): pulumi.Output<T>

method getData

protected getData(): Promise<TData>

Retrieves the data produces by [initialize]. The data is immediately available in a derived class’s constructor after the super(...) call to ComponentResource.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method getResource

public getResource(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", name: string): pulumi.Output<MutatingWebhookConfiguration>

getResource returns a resource defined by a built-in Kubernetes group/version/kind and name.

For example: getResource(“apps/v1/Deployment”, “nginx”)

public getResource(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", namespace: string, name: string): pulumi.Output<MutatingWebhookConfiguration>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", name: string): pulumi.Output<MutatingWebhookConfigurationList>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", namespace: string, name: string): pulumi.Output<MutatingWebhookConfigurationList>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1/ValidatingWebhookConfiguration", name: string): pulumi.Output<ValidatingWebhookConfiguration>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1/ValidatingWebhookConfiguration", namespace: string, name: string): pulumi.Output<ValidatingWebhookConfiguration>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1/ValidatingWebhookConfigurationList", name: string): pulumi.Output<ValidatingWebhookConfigurationList>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1/ValidatingWebhookConfigurationList", namespace: string, name: string): pulumi.Output<ValidatingWebhookConfigurationList>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1beta1/MutatingWebhookConfiguration", name: string): pulumi.Output<MutatingWebhookConfiguration>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1beta1/MutatingWebhookConfiguration", namespace: string, name: string): pulumi.Output<MutatingWebhookConfiguration>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1beta1/MutatingWebhookConfigurationList", name: string): pulumi.Output<MutatingWebhookConfigurationList>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1beta1/MutatingWebhookConfigurationList", namespace: string, name: string): pulumi.Output<MutatingWebhookConfigurationList>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1beta1/ValidatingWebhookConfiguration", name: string): pulumi.Output<ValidatingWebhookConfiguration>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1beta1/ValidatingWebhookConfiguration", namespace: string, name: string): pulumi.Output<ValidatingWebhookConfiguration>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1beta1/ValidatingWebhookConfigurationList", name: string): pulumi.Output<ValidatingWebhookConfigurationList>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1beta1/ValidatingWebhookConfigurationList", namespace: string, name: string): pulumi.Output<ValidatingWebhookConfigurationList>
public getResource(groupVersionKind: "apiextensions.k8s.io/v1/CustomResourceDefinition", name: string): pulumi.Output<CustomResourceDefinition>
public getResource(groupVersionKind: "apiextensions.k8s.io/v1/CustomResourceDefinition", namespace: string, name: string): pulumi.Output<CustomResourceDefinition>
public getResource(groupVersionKind: "apiextensions.k8s.io/v1/CustomResourceDefinitionList", name: string): pulumi.Output<CustomResourceDefinitionList>
public getResource(groupVersionKind: "apiextensions.k8s.io/v1/CustomResourceDefinitionList", namespace: string, name: string): pulumi.Output<CustomResourceDefinitionList>
+ 374 additional overloads

method getResourceProperty

public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", name: string, property: "apiVersion"): pulumi.Output<"admissionregistration.k8s.io/v1">

getResourceProperty returns a single property of a resource defined by a built-in Kubernetes group/version/kind and name.

For example: getResourceProperty(“v1/Service”, “nginx”, “spec”)

public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", namespace: string, name: string, property: "apiVersion"): pulumi.Output<"admissionregistration.k8s.io/v1">
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", name: string, property: "kind"): pulumi.Output<"MutatingWebhookConfiguration">
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", namespace: string, name: string, property: "kind"): pulumi.Output<"MutatingWebhookConfiguration">
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", name: string, property: "metadata"): pulumi.Output<ObjectMeta>
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", namespace: string, name: string, property: "metadata"): pulumi.Output<ObjectMeta>
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", name: string, property: "webhooks"): pulumi.Output<MutatingWebhook[]>
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", namespace: string, name: string, property: "webhooks"): pulumi.Output<MutatingWebhook[]>
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", name: string, property: "apiVersion"): pulumi.Output<"admissionregistration.k8s.io/v1">
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", namespace: string, name: string, property: "apiVersion"): pulumi.Output<"admissionregistration.k8s.io/v1">
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", name: string, property: "items"): pulumi.Output<MutatingWebhookConfiguration[]>
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", namespace: string, name: string, property: "items"): pulumi.Output<MutatingWebhookConfiguration[]>
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", name: string, property: "kind"): pulumi.Output<"MutatingWebhookConfigurationList">
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", namespace: string, name: string, property: "kind"): pulumi.Output<"MutatingWebhookConfigurationList">
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", name: string, property: "metadata"): pulumi.Output<ListMeta>
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", namespace: string, name: string, property: "metadata"): pulumi.Output<ListMeta>
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/ValidatingWebhookConfiguration", name: string, property: "apiVersion"): pulumi.Output<"admissionregistration.k8s.io/v1">
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/ValidatingWebhookConfiguration", namespace: string, name: string, property: "apiVersion"): pulumi.Output<"admissionregistration.k8s.io/v1">
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/ValidatingWebhookConfiguration", name: string, property: "kind"): pulumi.Output<"ValidatingWebhookConfiguration">
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/ValidatingWebhookConfiguration", namespace: string, name: string, property: "kind"): pulumi.Output<"ValidatingWebhookConfiguration">
+ 1836 additional overloads

method initialize

protected initialize(args: Inputs): Promise<TData>

Can be overridden by a subclass to asynchronously initialize data for this Component automatically when constructed. The data will be available immediately for subclass constructors to use. To access the data use .getData.

method isInstance

static isInstance(obj: any): obj is ComponentResource

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

method registerOutputs

protected registerOutputs(outputs?: Inputs | Promise<Inputs> | Output<Inputs>): void

registerOutputs registers synthetic outputs that a component has initialized, usually by allocating other child sub-resources and propagating their resulting property values.

ComponentResources can call this at the end of their constructor to indicate that they are done creating child resources. This is not strictly necessary as this will automatically be called after the initialize method completes.

property resources

resources: pulumi.Output<{[key: string]: CustomResource}>;

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Others

class ConfigFile

class ConfigFile extends CollectionComponentResource

ConfigFile creates a set of Kubernetes resources from Kubernetes YAML file. If config.name is not specified, ConfigFile assumes the argument name is the filename.

Example Usage

Local File
import * as k8s from "@pulumi/kubernetes";

const example = new k8s.yaml.ConfigFile("example", {
  file: "foo.yaml",
});
YAML with Transformations
import * as k8s from "@pulumi/kubernetes";

const example = new k8s.yaml.ConfigFile("example", {
  file: "foo.yaml",
  transformations: [
    // Make every service private to the cluster, i.e., turn all services into ClusterIP instead of LoadBalancer.
    (obj: any, opts: pulumi.CustomResourceOptions) => {
      if (obj.kind === "Service" && obj.apiVersion === "v1") {
        if (obj.spec && obj.spec.type && obj.spec.type === "LoadBalancer") {
          obj.spec.type = "ClusterIP";
        }
      }
    },

    // Set a resource alias for a previous name.
    (obj: any, opts: pulumi.CustomResourceOptions) => {
    if (obj.kind === "Deployment") {
      opts.aliases = [{ name: "oldName" }]
    },

    // Omit a resource from the Chart by transforming the specified resource definition to an empty List.
    (obj: any, opts: pulumi.CustomResourceOptions) => {
    if (obj.kind === "Pod" && obj.metadata.name === "test") {
      obj.apiVersion = "v1"
      obj.kind = "List"
    },
  ],
});

constructor

new ConfigFile(name: string, config?: ConfigFileOpts, opts?: pulumi.ComponentResourceOptions)

Create a ConfigFile resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • config The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method getCustomResource

public getCustomResource<T>(groupVersionKind: string, namespace: string): pulumi.Output<T>

getCustomResource returns a resource defined by a CRD with the given group/version/kind and name.

For example: getCustomResource(“monitoring.coreos.com/v1/ServiceMonitor”, “kube-prometheus-exporter-kubernetes”)

public getCustomResource<T>(groupVersionKind: string, namespace: string, name: string): pulumi.Output<T>

method getData

protected getData(): Promise<TData>

Retrieves the data produces by [initialize]. The data is immediately available in a derived class’s constructor after the super(...) call to ComponentResource.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method getResource

public getResource(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", name: string): pulumi.Output<MutatingWebhookConfiguration>

getResource returns a resource defined by a built-in Kubernetes group/version/kind and name.

For example: getResource(“apps/v1/Deployment”, “nginx”)

public getResource(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", namespace: string, name: string): pulumi.Output<MutatingWebhookConfiguration>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", name: string): pulumi.Output<MutatingWebhookConfigurationList>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", namespace: string, name: string): pulumi.Output<MutatingWebhookConfigurationList>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1/ValidatingWebhookConfiguration", name: string): pulumi.Output<ValidatingWebhookConfiguration>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1/ValidatingWebhookConfiguration", namespace: string, name: string): pulumi.Output<ValidatingWebhookConfiguration>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1/ValidatingWebhookConfigurationList", name: string): pulumi.Output<ValidatingWebhookConfigurationList>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1/ValidatingWebhookConfigurationList", namespace: string, name: string): pulumi.Output<ValidatingWebhookConfigurationList>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1beta1/MutatingWebhookConfiguration", name: string): pulumi.Output<MutatingWebhookConfiguration>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1beta1/MutatingWebhookConfiguration", namespace: string, name: string): pulumi.Output<MutatingWebhookConfiguration>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1beta1/MutatingWebhookConfigurationList", name: string): pulumi.Output<MutatingWebhookConfigurationList>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1beta1/MutatingWebhookConfigurationList", namespace: string, name: string): pulumi.Output<MutatingWebhookConfigurationList>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1beta1/ValidatingWebhookConfiguration", name: string): pulumi.Output<ValidatingWebhookConfiguration>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1beta1/ValidatingWebhookConfiguration", namespace: string, name: string): pulumi.Output<ValidatingWebhookConfiguration>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1beta1/ValidatingWebhookConfigurationList", name: string): pulumi.Output<ValidatingWebhookConfigurationList>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1beta1/ValidatingWebhookConfigurationList", namespace: string, name: string): pulumi.Output<ValidatingWebhookConfigurationList>
public getResource(groupVersionKind: "apiextensions.k8s.io/v1/CustomResourceDefinition", name: string): pulumi.Output<CustomResourceDefinition>
public getResource(groupVersionKind: "apiextensions.k8s.io/v1/CustomResourceDefinition", namespace: string, name: string): pulumi.Output<CustomResourceDefinition>
public getResource(groupVersionKind: "apiextensions.k8s.io/v1/CustomResourceDefinitionList", name: string): pulumi.Output<CustomResourceDefinitionList>
public getResource(groupVersionKind: "apiextensions.k8s.io/v1/CustomResourceDefinitionList", namespace: string, name: string): pulumi.Output<CustomResourceDefinitionList>
+ 374 additional overloads

method getResourceProperty

public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", name: string, property: "apiVersion"): pulumi.Output<"admissionregistration.k8s.io/v1">

getResourceProperty returns a single property of a resource defined by a built-in Kubernetes group/version/kind and name.

For example: getResourceProperty(“v1/Service”, “nginx”, “spec”)

public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", namespace: string, name: string, property: "apiVersion"): pulumi.Output<"admissionregistration.k8s.io/v1">
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", name: string, property: "kind"): pulumi.Output<"MutatingWebhookConfiguration">
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", namespace: string, name: string, property: "kind"): pulumi.Output<"MutatingWebhookConfiguration">
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", name: string, property: "metadata"): pulumi.Output<ObjectMeta>
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", namespace: string, name: string, property: "metadata"): pulumi.Output<ObjectMeta>
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", name: string, property: "webhooks"): pulumi.Output<MutatingWebhook[]>
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", namespace: string, name: string, property: "webhooks"): pulumi.Output<MutatingWebhook[]>
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", name: string, property: "apiVersion"): pulumi.Output<"admissionregistration.k8s.io/v1">
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", namespace: string, name: string, property: "apiVersion"): pulumi.Output<"admissionregistration.k8s.io/v1">
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", name: string, property: "items"): pulumi.Output<MutatingWebhookConfiguration[]>
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", namespace: string, name: string, property: "items"): pulumi.Output<MutatingWebhookConfiguration[]>
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", name: string, property: "kind"): pulumi.Output<"MutatingWebhookConfigurationList">
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", namespace: string, name: string, property: "kind"): pulumi.Output<"MutatingWebhookConfigurationList">
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", name: string, property: "metadata"): pulumi.Output<ListMeta>
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", namespace: string, name: string, property: "metadata"): pulumi.Output<ListMeta>
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/ValidatingWebhookConfiguration", name: string, property: "apiVersion"): pulumi.Output<"admissionregistration.k8s.io/v1">
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/ValidatingWebhookConfiguration", namespace: string, name: string, property: "apiVersion"): pulumi.Output<"admissionregistration.k8s.io/v1">
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/ValidatingWebhookConfiguration", name: string, property: "kind"): pulumi.Output<"ValidatingWebhookConfiguration">
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/ValidatingWebhookConfiguration", namespace: string, name: string, property: "kind"): pulumi.Output<"ValidatingWebhookConfiguration">
+ 1836 additional overloads

method initialize

protected initialize(args: Inputs): Promise<TData>

Can be overridden by a subclass to asynchronously initialize data for this Component automatically when constructed. The data will be available immediately for subclass constructors to use. To access the data use .getData.

method isInstance

static isInstance(obj: any): obj is ComponentResource

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

method registerOutputs

protected registerOutputs(outputs?: Inputs | Promise<Inputs> | Output<Inputs>): void

registerOutputs registers synthetic outputs that a component has initialized, usually by allocating other child sub-resources and propagating their resulting property values.

ComponentResources can call this at the end of their constructor to indicate that they are done creating child resources. This is not strictly necessary as this will automatically be called after the initialize method completes.

property resources

resources: pulumi.Output<{[key: string]: CustomResource}>;

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

interface ConfigFileOpts

interface ConfigFileOpts

The set of arguments for constructing a ConfigFile resource.

property file

file?: undefined | string;

Path or a URL that uniquely identifies a file.

property resourcePrefix

resourcePrefix?: undefined | string;

An optional prefix for the auto-generated resource names. Example: A resource created with resourcePrefix=“foo” would produce a resource named “foo-resourceName”.

property transformations

transformations?: (o: any, opts: CustomResourceOptions) => void[];

A set of transformations to apply to Kubernetes resource definitions before registering with engine.

class ConfigGroup

class ConfigGroup extends CollectionComponentResource

ConfigGroup creates a set of Kubernetes resources from Kubernetes YAML text. The YAML text may be supplied using any of the following ConfigGroupOpts:

  1. Using a filename or a list of filenames: a. {files: "foo.yaml"} b. {files: ["foo.yaml", "bar.yaml"]}
  2. Using a file pattern or a list of file patterns: a. {files: "*.yaml"} b. {files: ["foo/*.yaml", "bar/*.yaml"]}
  3. Using a literal string containing YAML, or a list of such strings: a. {yaml: "(LITERAL YAML HERE)"} b. {yaml: ["(LITERAL YAML HERE)", "(MORE YAML)"]}
  4. Any combination of files, patterns, or YAML strings: a. {files: "foo.yaml", yaml: "(LITERAL YAML HERE)"}

Example Usage

Local File
import * as k8s from "@pulumi/kubernetes";

const example = new k8s.yaml.ConfigGroup("example", {
  files: "foo.yaml",
});
Multiple Local Files
import * as k8s from "@pulumi/kubernetes";

const example = new k8s.yaml.ConfigGroup("example", {
  files: ["foo.yaml", "bar.yaml"],
});
Local File Pattern
import * as k8s from "@pulumi/kubernetes";

const example = new k8s.yaml.ConfigGroup("example", {
  files: "yaml/*.yaml",
});
Multiple Local File Patterns
import * as k8s from "@pulumi/kubernetes";

const example = new k8s.yaml.ConfigGroup("example", {
  files: ["foo/*.yaml", "bar/*.yaml"],
});
Literal YAML String
import * as k8s from "@pulumi/kubernetes";

const example = new k8s.yaml.ConfigGroup("example", {
  yaml: `
apiVersion: v1
kind: Namespace
metadata:
  name: foo
`,
})
YAML with Transformations
import * as k8s from "@pulumi/kubernetes";

const example = new k8s.yaml.ConfigGroup("example", {
  files: "foo.yaml",
  transformations: [
    // Make every service private to the cluster, i.e., turn all services into ClusterIP instead of LoadBalancer.
    (obj: any, opts: pulumi.CustomResourceOptions) => {
      if (obj.kind === "Service" && obj.apiVersion === "v1") {
        if (obj.spec && obj.spec.type && obj.spec.type === "LoadBalancer") {
          obj.spec.type = "ClusterIP";
        }
      }
    },

    // Set a resource alias for a previous name.
    (obj: any, opts: pulumi.CustomResourceOptions) => {
    if (obj.kind === "Deployment") {
      opts.aliases = [{ name: "oldName" }]
    },

    // Omit a resource from the Chart by transforming the specified resource definition to an empty List.
    (obj: any, opts: pulumi.CustomResourceOptions) => {
    if (obj.kind === "Pod" && obj.metadata.name === "test") {
      obj.apiVersion = "v1"
      obj.kind = "List"
    },
  ],
});

constructor

new ConfigGroup(name: string, config: ConfigGroupOpts, opts?: pulumi.ComponentResourceOptions)

Create a ConfigGroup resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • config The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method getCustomResource

public getCustomResource<T>(groupVersionKind: string, namespace: string): pulumi.Output<T>

getCustomResource returns a resource defined by a CRD with the given group/version/kind and name.

For example: getCustomResource(“monitoring.coreos.com/v1/ServiceMonitor”, “kube-prometheus-exporter-kubernetes”)

public getCustomResource<T>(groupVersionKind: string, namespace: string, name: string): pulumi.Output<T>

method getData

protected getData(): Promise<TData>

Retrieves the data produces by [initialize]. The data is immediately available in a derived class’s constructor after the super(...) call to ComponentResource.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method getResource

public getResource(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", name: string): pulumi.Output<MutatingWebhookConfiguration>

getResource returns a resource defined by a built-in Kubernetes group/version/kind and name.

For example: getResource(“apps/v1/Deployment”, “nginx”)

public getResource(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", namespace: string, name: string): pulumi.Output<MutatingWebhookConfiguration>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", name: string): pulumi.Output<MutatingWebhookConfigurationList>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", namespace: string, name: string): pulumi.Output<MutatingWebhookConfigurationList>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1/ValidatingWebhookConfiguration", name: string): pulumi.Output<ValidatingWebhookConfiguration>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1/ValidatingWebhookConfiguration", namespace: string, name: string): pulumi.Output<ValidatingWebhookConfiguration>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1/ValidatingWebhookConfigurationList", name: string): pulumi.Output<ValidatingWebhookConfigurationList>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1/ValidatingWebhookConfigurationList", namespace: string, name: string): pulumi.Output<ValidatingWebhookConfigurationList>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1beta1/MutatingWebhookConfiguration", name: string): pulumi.Output<MutatingWebhookConfiguration>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1beta1/MutatingWebhookConfiguration", namespace: string, name: string): pulumi.Output<MutatingWebhookConfiguration>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1beta1/MutatingWebhookConfigurationList", name: string): pulumi.Output<MutatingWebhookConfigurationList>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1beta1/MutatingWebhookConfigurationList", namespace: string, name: string): pulumi.Output<MutatingWebhookConfigurationList>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1beta1/ValidatingWebhookConfiguration", name: string): pulumi.Output<ValidatingWebhookConfiguration>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1beta1/ValidatingWebhookConfiguration", namespace: string, name: string): pulumi.Output<ValidatingWebhookConfiguration>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1beta1/ValidatingWebhookConfigurationList", name: string): pulumi.Output<ValidatingWebhookConfigurationList>
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1beta1/ValidatingWebhookConfigurationList", namespace: string, name: string): pulumi.Output<ValidatingWebhookConfigurationList>
public getResource(groupVersionKind: "apiextensions.k8s.io/v1/CustomResourceDefinition", name: string): pulumi.Output<CustomResourceDefinition>
public getResource(groupVersionKind: "apiextensions.k8s.io/v1/CustomResourceDefinition", namespace: string, name: string): pulumi.Output<CustomResourceDefinition>
public getResource(groupVersionKind: "apiextensions.k8s.io/v1/CustomResourceDefinitionList", name: string): pulumi.Output<CustomResourceDefinitionList>
public getResource(groupVersionKind: "apiextensions.k8s.io/v1/CustomResourceDefinitionList", namespace: string, name: string): pulumi.Output<CustomResourceDefinitionList>
+ 374 additional overloads

method getResourceProperty

public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", name: string, property: "apiVersion"): pulumi.Output<"admissionregistration.k8s.io/v1">

getResourceProperty returns a single property of a resource defined by a built-in Kubernetes group/version/kind and name.

For example: getResourceProperty(“v1/Service”, “nginx”, “spec”)

public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", namespace: string, name: string, property: "apiVersion"): pulumi.Output<"admissionregistration.k8s.io/v1">
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", name: string, property: "kind"): pulumi.Output<"MutatingWebhookConfiguration">
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", namespace: string, name: string, property: "kind"): pulumi.Output<"MutatingWebhookConfiguration">
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", name: string, property: "metadata"): pulumi.Output<ObjectMeta>
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", namespace: string, name: string, property: "metadata"): pulumi.Output<ObjectMeta>
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", name: string, property: "webhooks"): pulumi.Output<MutatingWebhook[]>
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", namespace: string, name: string, property: "webhooks"): pulumi.Output<MutatingWebhook[]>
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", name: string, property: "apiVersion"): pulumi.Output<"admissionregistration.k8s.io/v1">
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", namespace: string, name: string, property: "apiVersion"): pulumi.Output<"admissionregistration.k8s.io/v1">
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", name: string, property: "items"): pulumi.Output<MutatingWebhookConfiguration[]>
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", namespace: string, name: string, property: "items"): pulumi.Output<MutatingWebhookConfiguration[]>
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", name: string, property: "kind"): pulumi.Output<"MutatingWebhookConfigurationList">
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", namespace: string, name: string, property: "kind"): pulumi.Output<"MutatingWebhookConfigurationList">
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", name: string, property: "metadata"): pulumi.Output<ListMeta>
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", namespace: string, name: string, property: "metadata"): pulumi.Output<ListMeta>
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/ValidatingWebhookConfiguration", name: string, property: "apiVersion"): pulumi.Output<"admissionregistration.k8s.io/v1">
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/ValidatingWebhookConfiguration", namespace: string, name: string, property: "apiVersion"): pulumi.Output<"admissionregistration.k8s.io/v1">
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/ValidatingWebhookConfiguration", name: string, property: "kind"): pulumi.Output<"ValidatingWebhookConfiguration">
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/ValidatingWebhookConfiguration", namespace: string, name: string, property: "kind"): pulumi.Output<"ValidatingWebhookConfiguration">
+ 1836 additional overloads

method initialize

protected initialize(args: Inputs): Promise<TData>

Can be overridden by a subclass to asynchronously initialize data for this Component automatically when constructed. The data will be available immediately for subclass constructors to use. To access the data use .getData.

method isInstance

static isInstance(obj: any): obj is ComponentResource

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

method registerOutputs

protected registerOutputs(outputs?: Inputs | Promise<Inputs> | Output<Inputs>): void

registerOutputs registers synthetic outputs that a component has initialized, usually by allocating other child sub-resources and propagating their resulting property values.

ComponentResources can call this at the end of their constructor to indicate that they are done creating child resources. This is not strictly necessary as this will automatically be called after the initialize method completes.

property resources

resources: pulumi.Output<{[key: string]: CustomResource}>;

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

interface ConfigGroupOpts

interface ConfigGroupOpts

The set of arguments for constructing a ConfigGroup resource.

property files

files?: string[] | string;

Set of paths or a URLs that uniquely identify files.

property objs

objs?: any[] | any;

JavaScript objects representing Kubernetes resources.

property resourcePrefix

resourcePrefix?: undefined | string;

An optional prefix for the auto-generated resource names. Example: A resource created with resourcePrefix=“foo” would produce a resource named “foo-resourceName”.

property transformations

transformations?: (o: any, opts: CustomResourceOptions) => void[];

A set of transformations to apply to Kubernetes resource definitions before registering with engine.

property yaml

yaml?: string[] | string;

YAML text containing Kubernetes resource definitions.

interface ConfigOpts

interface ConfigOpts

The set of arguments common to the ConfigFile and ConfigGroup resources.

property objs

objs: Promise<any[]>;

JavaScript objects representing Kubernetes resources.

property resourcePrefix

resourcePrefix?: undefined | string;

An optional prefix for the auto-generated resource names. Example: A resource created with resourcePrefix=“foo” would produce a resource named “foo-resourceName”.

property transformations

transformations?: (o: any, opts: CustomResourceOptions) => void[];

A set of transformations to apply to Kubernetes resource definitions before registering with engine.