Module apiextensions

@pulumi/kubernetes > apiextensions

Modules ▾

class CustomResource

extends CustomResource

CustomResource represents an instance of a CustomResourceDefinition (CRD). For example, the CoreOS Prometheus operator exposes a CRD; to instantiate this as a Pulumi resource, one could call new CustomResource, passing the ServiceMonitor resource definition as an argument.


new CustomResource(name: string, args: CustomResourceArgs, opts?: pulumi.CustomResourceOptions)

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

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

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 getInputs

public getInputs(): CustomResourceArgs

property kind

public kind: pulumi.Output<string>;

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:

property metadata

public metadata: pulumi.Output<outputApi.meta.v1.ObjectMeta>;

Standard object metadata; More info:

property urn

urn: Output<URN>;

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

property apiVersion

public apiVersion: pulumi.Output<string>;

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

interface CustomResourceArgs

CustomResourceArgs represents a resource definiton we’d use to create an instance of a Kubernetes CustomResourceDefinition (CRD). For example, the CoreOS Prometheus operator exposes a CRD; to create a ServiceMonitor, we’d pass a CustomResourceArgs containing the ServiceMonitor definition to apiextensions.CustomResource.

NOTE: This type is fairly loose, since other than apiVersion and kind, there are no fields required across all CRDs.

property apiVersion

apiVersion: pulumi.Input<string>;

property kind

property metadata

metadata?: pulumi.Input<inputApi.meta.v1.ObjectMeta>;