com.pulumi.kubernetes.yaml.v2.ConfigFile Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kubernetes Show documentation
Show all versions of kubernetes Show documentation
A Pulumi package for creating and managing Kubernetes resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.kubernetes.yaml.v2;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import com.pulumi.kubernetes.Utilities;
import com.pulumi.kubernetes.yaml.v2.ConfigFileArgs;
import java.lang.Object;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* ConfigFile creates a set of Kubernetes resources from a remote or on-disk Kubernetes YAML file.
* (If you have in-memory YAML a ConfigGroup may be more appropriate.)
*
* ## Dependency ordering
* Sometimes resources must be applied in a specific order. For example, a namespace resource must be
* created before any namespaced resources, or a Custom Resource Definition (CRD) must be pre-installed.
*
* Pulumi uses heuristics to determine which order to apply and delete objects within the ConfigFile. Pulumi also
* waits for each object to be fully reconciled, unless `skipAwait` is enabled.
*
* ### Explicit Dependency Ordering
* Pulumi supports the `config.kubernetes.io/depends-on` annotation to declare an explicit dependency on a given resource.
* The annotation accepts a list of resource references, delimited by commas.
*
* Note that references to resources outside the ConfigFile aren't supported.
*
* **Resource reference**
*
* A resource reference is a string that uniquely identifies a resource.
*
* It consists of the group, kind, name, and optionally the namespace, delimited by forward slashes.
*
* | Resource Scope | Format |
* | :--------------- | :--------------------------------------------- |
* | namespace-scoped | `<group>/namespaces/<namespace>/<kind>/<name>` |
* | cluster-scoped | `<group>/<kind>/<name>` |
*
* For resources in the “core” group, the empty string is used instead (for example: `/namespaces/test/Pod/pod-a`).
*
* ### Ordering across ConfigFiles
* The `dependsOn` resource option creates a list of explicit dependencies between Pulumi resources.
* Use it on another resource to make it dependent on the ConfigFile and to wait for the resources within
* the group to be deployed.
*
* A best practice is to deploy each application using its own ConfigFile, especially when that application
* installs custom resource definitions.
*
* ## Example Usage
* ### Local File
*
* {@code
* package myproject;
*
* import com.pulumi.Pulumi;
* import com.pulumi.kubernetes.yaml.v2.ConfigFile;
* import com.pulumi.kubernetes.yaml.v2.ConfigFileArgs;
*
* public class App {
* public static void main(String[] args) {
* Pulumi.run(ctx -> {
* var example = new ConfigFile("example", ConfigFileArgs.builder()
* .file("./manifest.yaml")
* .build());
* });
* }
* }
* }
*
* {% /examples %}}
*
*/
@ResourceType(type="kubernetes:yaml/v2:ConfigFile")
public class ConfigFile extends com.pulumi.resources.ComponentResource {
/**
* Resources created by the ConfigFile.
*
*/
@Export(name="resources", refs={List.class,Object.class}, tree="[0,1]")
private Output* @Nullable */ List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy