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 monitoring.coreos.com/ServiceMonitor; to instantiate this as a Pulumi resource, one could call new CustomResource, passing the ServiceMonitor resource definition as an argument.

constructor

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 get

public static get(name: string, opts: CustomResourceGetOptions): CustomResource

Get the state of an existing CustomResource, as identified by id. Typically this ID is of the form <namespace>/<name>; if <namespace> is omitted, then (per Kubernetes convention) the ID becomes default/<name>.

Pulumi will keep track of this resource using name as the Pulumi ID.

method getInputs

public getInputs(): CustomResourceArgs

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.

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: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources

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.

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: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds

property metadata

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

Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.

property urn

urn: Output<URN>;

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

interface CustomResourceArgs

CustomResourceArgs represents a resource definition we’d use to create an instance of a Kubernetes CustomResourceDefinition (CRD). For example, the CoreOS Prometheus operator exposes a CRD monitoring.coreos.com/ServiceMonitor; 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>;

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: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources

property kind

kind: pulumi.Input<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: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds

property metadata

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

Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.

interface CustomResourceGetOptions

extends CustomResourceOptions

CustomResourceGetOptions uniquely identifies a Kubernetes CustomResource, primarily for use in supplied to apiextensions.CustomResource#get.

property additionalSecretOutputs

additionalSecretOutputs?: string[];

The names of outputs for this resource that should be treated as secrets. This augments the list that the resource provider and pulumi engine already determine based on inputs to your resource. It can be used to mark certain ouputs as a secrets on a per resource basis.

property aliases

aliases?: Input<URN | Alias>[];

An optional list of aliases to treat this resource as matching.

property apiVersion

apiVersion: pulumi.Input<string>;

apiVersion is the API version of the apiExtensions.CustomResource we wish to select, as specified by the CustomResourceDefinition that defines it on the API server.

property customTimeouts

customTimeouts?: CustomTimeouts;

An optional customTimeouts configuration block.

property deleteBeforeReplace

deleteBeforeReplace?: undefined | false | true;

When set to true, deleteBeforeReplace indicates that this resource should be deleted before its replacement is created when replacement is necessary.

property dependsOn

dependsOn?: Input<Input<Resource>[]> | Input<Resource>;

An optional additional explicit dependencies on other resources.

property id

id: pulumi.Input<pulumi.ID>;

An ID for the Kubernetes resource to retrive. Takes the form <namespace>/<name> or <name>.

property ignoreChanges

ignoreChanges?: string[];

Ignore changes to any of the specified properties.

property import

import?: ID;

When provided with a resource ID, import indicates that this resource’s provider should import its state from the cloud resource with the given ID. The inputs to the resource’s constructor must align with the resource’s current state. Once a resource has been imported, the import property must be removed from the resource’s options.

property kind

kind: pulumi.Input<string>;

kind is the kind of the apiextensions.CustomResource we wish to select, as specified by the CustomResourceDefinition that defines it on the API server.

property parent

parent?: Resource;

An optional parent resource to which this resource belongs.

property protect

protect?: undefined | false | true;

When set to true, protect ensures this resource cannot be deleted.

property provider

provider?: ProviderResource;

An optional provider to use for this resource’s CRUD operations. If no provider is supplied, the default provider for the resource’s package will be used. The default provider is pulled from the parent’s provider bag (see also ComponentResourceOptions.providers).

If this is a [ComponentResourceOptions] do not provide both [provider] and [providers]

property version

version?: undefined | string;

An optional version, corresponding to the version of the provider plugin that should be used when operating on this resource. This version overrides the version information inferred from the current package and should rarely be used.