rancher2.AppV2
Explore with Pulumi AI
Provides a Rancher App v2 resource. This can be used to manage helm charts for Rancher v2 environments and retrieve their information. App v2 resource is available at Rancher v2.5.x and above.
Example Usage
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Pulumi;
using Rancher2 = Pulumi.Rancher2;
return await Deployment.RunAsync(() =>
{
// Create a new Rancher2 App V2 using
var foo = new Rancher2.AppV2("foo", new()
{
ClusterId = "<CLUSTER_ID>",
Namespace = "cattle-monitoring-system",
RepoName = "rancher-charts",
ChartName = "rancher-monitoring",
ChartVersion = "9.4.200",
Values = File.ReadAllText("values.yaml"),
});
});
package main
import (
"os"
"github.com/pulumi/pulumi-rancher2/sdk/v5/go/rancher2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func readFileOrPanic(path string) pulumi.StringPtrInput {
data, err := os.ReadFile(path)
if err != nil {
panic(err.Error())
}
return pulumi.String(string(data))
}
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := rancher2.NewAppV2(ctx, "foo", &rancher2.AppV2Args{
ClusterId: pulumi.String("<CLUSTER_ID>"),
Namespace: pulumi.String("cattle-monitoring-system"),
RepoName: pulumi.String("rancher-charts"),
ChartName: pulumi.String("rancher-monitoring"),
ChartVersion: pulumi.String("9.4.200"),
Values: readFileOrPanic("values.yaml"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.rancher2.AppV2;
import com.pulumi.rancher2.AppV2Args;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var foo = new AppV2("foo", AppV2Args.builder()
.clusterId("<CLUSTER_ID>")
.namespace("cattle-monitoring-system")
.repoName("rancher-charts")
.chartName("rancher-monitoring")
.chartVersion("9.4.200")
.values(Files.readString(Paths.get("values.yaml")))
.build());
}
}
import pulumi
import pulumi_rancher2 as rancher2
# Create a new Rancher2 App V2 using
foo = rancher2.AppV2("foo",
cluster_id="<CLUSTER_ID>",
namespace="cattle-monitoring-system",
repo_name="rancher-charts",
chart_name="rancher-monitoring",
chart_version="9.4.200",
values=(lambda path: open(path).read())("values.yaml"))
import * as pulumi from "@pulumi/pulumi";
import * as fs from "fs";
import * as rancher2 from "@pulumi/rancher2";
// Create a new Rancher2 App V2 using
const foo = new rancher2.AppV2("foo", {
clusterId: "<CLUSTER_ID>",
namespace: "cattle-monitoring-system",
repoName: "rancher-charts",
chartName: "rancher-monitoring",
chartVersion: "9.4.200",
values: fs.readFileSync("values.yaml"),
});
resources:
# Create a new Rancher2 App V2 using
foo:
type: rancher2:AppV2
properties:
clusterId: <CLUSTER_ID>
namespace: cattle-monitoring-system
repoName: rancher-charts
chartName: rancher-monitoring
chartVersion: 9.4.200
values:
fn::readFile: values.yaml
Create AppV2 Resource
new AppV2(name: string, args: AppV2Args, opts?: CustomResourceOptions);
@overload
def AppV2(resource_name: str,
opts: Optional[ResourceOptions] = None,
annotations: Optional[Mapping[str, Any]] = None,
chart_name: Optional[str] = None,
chart_version: Optional[str] = None,
cleanup_on_fail: Optional[bool] = None,
cluster_id: Optional[str] = None,
disable_hooks: Optional[bool] = None,
disable_open_api_validation: Optional[bool] = None,
force_upgrade: Optional[bool] = None,
labels: Optional[Mapping[str, Any]] = None,
name: Optional[str] = None,
namespace: Optional[str] = None,
project_id: Optional[str] = None,
repo_name: Optional[str] = None,
values: Optional[str] = None,
wait: Optional[bool] = None)
@overload
def AppV2(resource_name: str,
args: AppV2Args,
opts: Optional[ResourceOptions] = None)
func NewAppV2(ctx *Context, name string, args AppV2Args, opts ...ResourceOption) (*AppV2, error)
public AppV2(string name, AppV2Args args, CustomResourceOptions? opts = null)
type: rancher2:AppV2
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AppV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args AppV2Args
- 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 AppV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AppV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AppV2Args
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
AppV2 Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The AppV2 resource accepts the following input properties:
- Chart
Name string The app v2 chart name (string)
- Cluster
Id string The cluster id of the app (string)
- Namespace string
The namespace of the app v2 (string)
- Repo
Name string Repo name (string)
- Annotations Dictionary<string, object>
Annotations for the app v2 (map)
- Chart
Version string The app v2 chart version (string)
- Cleanup
On boolFail Cleanup app v2 on failed chart upgrade. Default:
false
(bool)- Disable
Hooks bool Disable app v2 chart hooks. Default:
false
(bool)- Disable
Open boolApi Validation Disable app V2 Open API Validation. Default:
false
(bool)- Force
Upgrade bool Force app V2 chart upgrade. Default:
false
(bool)- Labels Dictionary<string, object>
Labels for the app v2 (map)
- Name string
The name of the app v2 (string)
- Project
Id string Deploy the app v2 within project ID (string)
- Values string
The app v2 values yaml. Yaml format is required (string)
- Wait bool
Wait until app is deployed. Default:
true
(bool)
- Chart
Name string The app v2 chart name (string)
- Cluster
Id string The cluster id of the app (string)
- Namespace string
The namespace of the app v2 (string)
- Repo
Name string Repo name (string)
- Annotations map[string]interface{}
Annotations for the app v2 (map)
- Chart
Version string The app v2 chart version (string)
- Cleanup
On boolFail Cleanup app v2 on failed chart upgrade. Default:
false
(bool)- Disable
Hooks bool Disable app v2 chart hooks. Default:
false
(bool)- Disable
Open boolApi Validation Disable app V2 Open API Validation. Default:
false
(bool)- Force
Upgrade bool Force app V2 chart upgrade. Default:
false
(bool)- Labels map[string]interface{}
Labels for the app v2 (map)
- Name string
The name of the app v2 (string)
- Project
Id string Deploy the app v2 within project ID (string)
- Values string
The app v2 values yaml. Yaml format is required (string)
- Wait bool
Wait until app is deployed. Default:
true
(bool)
- chart
Name String The app v2 chart name (string)
- cluster
Id String The cluster id of the app (string)
- namespace String
The namespace of the app v2 (string)
- repo
Name String Repo name (string)
- annotations Map<String,Object>
Annotations for the app v2 (map)
- chart
Version String The app v2 chart version (string)
- cleanup
On BooleanFail Cleanup app v2 on failed chart upgrade. Default:
false
(bool)- disable
Hooks Boolean Disable app v2 chart hooks. Default:
false
(bool)- disable
Open BooleanApi Validation Disable app V2 Open API Validation. Default:
false
(bool)- force
Upgrade Boolean Force app V2 chart upgrade. Default:
false
(bool)- labels Map<String,Object>
Labels for the app v2 (map)
- name String
The name of the app v2 (string)
- project
Id String Deploy the app v2 within project ID (string)
- values String
The app v2 values yaml. Yaml format is required (string)
- wait_ Boolean
Wait until app is deployed. Default:
true
(bool)
- chart
Name string The app v2 chart name (string)
- cluster
Id string The cluster id of the app (string)
- namespace string
The namespace of the app v2 (string)
- repo
Name string Repo name (string)
- annotations {[key: string]: any}
Annotations for the app v2 (map)
- chart
Version string The app v2 chart version (string)
- cleanup
On booleanFail Cleanup app v2 on failed chart upgrade. Default:
false
(bool)- disable
Hooks boolean Disable app v2 chart hooks. Default:
false
(bool)- disable
Open booleanApi Validation Disable app V2 Open API Validation. Default:
false
(bool)- force
Upgrade boolean Force app V2 chart upgrade. Default:
false
(bool)- labels {[key: string]: any}
Labels for the app v2 (map)
- name string
The name of the app v2 (string)
- project
Id string Deploy the app v2 within project ID (string)
- values string
The app v2 values yaml. Yaml format is required (string)
- wait boolean
Wait until app is deployed. Default:
true
(bool)
- chart_
name str The app v2 chart name (string)
- cluster_
id str The cluster id of the app (string)
- namespace str
The namespace of the app v2 (string)
- repo_
name str Repo name (string)
- annotations Mapping[str, Any]
Annotations for the app v2 (map)
- chart_
version str The app v2 chart version (string)
- cleanup_
on_ boolfail Cleanup app v2 on failed chart upgrade. Default:
false
(bool)- disable_
hooks bool Disable app v2 chart hooks. Default:
false
(bool)- disable_
open_ boolapi_ validation Disable app V2 Open API Validation. Default:
false
(bool)- force_
upgrade bool Force app V2 chart upgrade. Default:
false
(bool)- labels Mapping[str, Any]
Labels for the app v2 (map)
- name str
The name of the app v2 (string)
- project_
id str Deploy the app v2 within project ID (string)
- values str
The app v2 values yaml. Yaml format is required (string)
- wait bool
Wait until app is deployed. Default:
true
(bool)
- chart
Name String The app v2 chart name (string)
- cluster
Id String The cluster id of the app (string)
- namespace String
The namespace of the app v2 (string)
- repo
Name String Repo name (string)
- annotations Map<Any>
Annotations for the app v2 (map)
- chart
Version String The app v2 chart version (string)
- cleanup
On BooleanFail Cleanup app v2 on failed chart upgrade. Default:
false
(bool)- disable
Hooks Boolean Disable app v2 chart hooks. Default:
false
(bool)- disable
Open BooleanApi Validation Disable app V2 Open API Validation. Default:
false
(bool)- force
Upgrade Boolean Force app V2 chart upgrade. Default:
false
(bool)- labels Map<Any>
Labels for the app v2 (map)
- name String
The name of the app v2 (string)
- project
Id String Deploy the app v2 within project ID (string)
- values String
The app v2 values yaml. Yaml format is required (string)
- wait Boolean
Wait until app is deployed. Default:
true
(bool)
Outputs
All input properties are implicitly available as output properties. Additionally, the AppV2 resource produces the following output properties:
- Cluster
Name string (Computed) The cluster name of the app (string)
- Deployment
Values string Values YAML file including computed values. This field prevents incorrect discrepancies from showing in the terraform plan output when files change but values stay the same, due to additional computed values included by the provider itself.
- Id string
The provider-assigned unique ID for this managed resource.
- System
Default stringRegistry (Computed) The system default registry of the app (string)
- Cluster
Name string (Computed) The cluster name of the app (string)
- Deployment
Values string Values YAML file including computed values. This field prevents incorrect discrepancies from showing in the terraform plan output when files change but values stay the same, due to additional computed values included by the provider itself.
- Id string
The provider-assigned unique ID for this managed resource.
- System
Default stringRegistry (Computed) The system default registry of the app (string)
- cluster
Name String (Computed) The cluster name of the app (string)
- deployment
Values String Values YAML file including computed values. This field prevents incorrect discrepancies from showing in the terraform plan output when files change but values stay the same, due to additional computed values included by the provider itself.
- id String
The provider-assigned unique ID for this managed resource.
- system
Default StringRegistry (Computed) The system default registry of the app (string)
- cluster
Name string (Computed) The cluster name of the app (string)
- deployment
Values string Values YAML file including computed values. This field prevents incorrect discrepancies from showing in the terraform plan output when files change but values stay the same, due to additional computed values included by the provider itself.
- id string
The provider-assigned unique ID for this managed resource.
- system
Default stringRegistry (Computed) The system default registry of the app (string)
- cluster_
name str (Computed) The cluster name of the app (string)
- deployment_
values str Values YAML file including computed values. This field prevents incorrect discrepancies from showing in the terraform plan output when files change but values stay the same, due to additional computed values included by the provider itself.
- id str
The provider-assigned unique ID for this managed resource.
- system_
default_ strregistry (Computed) The system default registry of the app (string)
- cluster
Name String (Computed) The cluster name of the app (string)
- deployment
Values String Values YAML file including computed values. This field prevents incorrect discrepancies from showing in the terraform plan output when files change but values stay the same, due to additional computed values included by the provider itself.
- id String
The provider-assigned unique ID for this managed resource.
- system
Default StringRegistry (Computed) The system default registry of the app (string)
Look up Existing AppV2 Resource
Get an existing AppV2 resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: AppV2State, opts?: CustomResourceOptions): AppV2
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
annotations: Optional[Mapping[str, Any]] = None,
chart_name: Optional[str] = None,
chart_version: Optional[str] = None,
cleanup_on_fail: Optional[bool] = None,
cluster_id: Optional[str] = None,
cluster_name: Optional[str] = None,
deployment_values: Optional[str] = None,
disable_hooks: Optional[bool] = None,
disable_open_api_validation: Optional[bool] = None,
force_upgrade: Optional[bool] = None,
labels: Optional[Mapping[str, Any]] = None,
name: Optional[str] = None,
namespace: Optional[str] = None,
project_id: Optional[str] = None,
repo_name: Optional[str] = None,
system_default_registry: Optional[str] = None,
values: Optional[str] = None,
wait: Optional[bool] = None) -> AppV2
func GetAppV2(ctx *Context, name string, id IDInput, state *AppV2State, opts ...ResourceOption) (*AppV2, error)
public static AppV2 Get(string name, Input<string> id, AppV2State? state, CustomResourceOptions? opts = null)
public static AppV2 get(String name, Output<String> id, AppV2State state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Annotations Dictionary<string, object>
Annotations for the app v2 (map)
- Chart
Name string The app v2 chart name (string)
- Chart
Version string The app v2 chart version (string)
- Cleanup
On boolFail Cleanup app v2 on failed chart upgrade. Default:
false
(bool)- Cluster
Id string The cluster id of the app (string)
- Cluster
Name string (Computed) The cluster name of the app (string)
- Deployment
Values string Values YAML file including computed values. This field prevents incorrect discrepancies from showing in the terraform plan output when files change but values stay the same, due to additional computed values included by the provider itself.
- Disable
Hooks bool Disable app v2 chart hooks. Default:
false
(bool)- Disable
Open boolApi Validation Disable app V2 Open API Validation. Default:
false
(bool)- Force
Upgrade bool Force app V2 chart upgrade. Default:
false
(bool)- Labels Dictionary<string, object>
Labels for the app v2 (map)
- Name string
The name of the app v2 (string)
- Namespace string
The namespace of the app v2 (string)
- Project
Id string Deploy the app v2 within project ID (string)
- Repo
Name string Repo name (string)
- System
Default stringRegistry (Computed) The system default registry of the app (string)
- Values string
The app v2 values yaml. Yaml format is required (string)
- Wait bool
Wait until app is deployed. Default:
true
(bool)
- Annotations map[string]interface{}
Annotations for the app v2 (map)
- Chart
Name string The app v2 chart name (string)
- Chart
Version string The app v2 chart version (string)
- Cleanup
On boolFail Cleanup app v2 on failed chart upgrade. Default:
false
(bool)- Cluster
Id string The cluster id of the app (string)
- Cluster
Name string (Computed) The cluster name of the app (string)
- Deployment
Values string Values YAML file including computed values. This field prevents incorrect discrepancies from showing in the terraform plan output when files change but values stay the same, due to additional computed values included by the provider itself.
- Disable
Hooks bool Disable app v2 chart hooks. Default:
false
(bool)- Disable
Open boolApi Validation Disable app V2 Open API Validation. Default:
false
(bool)- Force
Upgrade bool Force app V2 chart upgrade. Default:
false
(bool)- Labels map[string]interface{}
Labels for the app v2 (map)
- Name string
The name of the app v2 (string)
- Namespace string
The namespace of the app v2 (string)
- Project
Id string Deploy the app v2 within project ID (string)
- Repo
Name string Repo name (string)
- System
Default stringRegistry (Computed) The system default registry of the app (string)
- Values string
The app v2 values yaml. Yaml format is required (string)
- Wait bool
Wait until app is deployed. Default:
true
(bool)
- annotations Map<String,Object>
Annotations for the app v2 (map)
- chart
Name String The app v2 chart name (string)
- chart
Version String The app v2 chart version (string)
- cleanup
On BooleanFail Cleanup app v2 on failed chart upgrade. Default:
false
(bool)- cluster
Id String The cluster id of the app (string)
- cluster
Name String (Computed) The cluster name of the app (string)
- deployment
Values String Values YAML file including computed values. This field prevents incorrect discrepancies from showing in the terraform plan output when files change but values stay the same, due to additional computed values included by the provider itself.
- disable
Hooks Boolean Disable app v2 chart hooks. Default:
false
(bool)- disable
Open BooleanApi Validation Disable app V2 Open API Validation. Default:
false
(bool)- force
Upgrade Boolean Force app V2 chart upgrade. Default:
false
(bool)- labels Map<String,Object>
Labels for the app v2 (map)
- name String
The name of the app v2 (string)
- namespace String
The namespace of the app v2 (string)
- project
Id String Deploy the app v2 within project ID (string)
- repo
Name String Repo name (string)
- system
Default StringRegistry (Computed) The system default registry of the app (string)
- values String
The app v2 values yaml. Yaml format is required (string)
- wait_ Boolean
Wait until app is deployed. Default:
true
(bool)
- annotations {[key: string]: any}
Annotations for the app v2 (map)
- chart
Name string The app v2 chart name (string)
- chart
Version string The app v2 chart version (string)
- cleanup
On booleanFail Cleanup app v2 on failed chart upgrade. Default:
false
(bool)- cluster
Id string The cluster id of the app (string)
- cluster
Name string (Computed) The cluster name of the app (string)
- deployment
Values string Values YAML file including computed values. This field prevents incorrect discrepancies from showing in the terraform plan output when files change but values stay the same, due to additional computed values included by the provider itself.
- disable
Hooks boolean Disable app v2 chart hooks. Default:
false
(bool)- disable
Open booleanApi Validation Disable app V2 Open API Validation. Default:
false
(bool)- force
Upgrade boolean Force app V2 chart upgrade. Default:
false
(bool)- labels {[key: string]: any}
Labels for the app v2 (map)
- name string
The name of the app v2 (string)
- namespace string
The namespace of the app v2 (string)
- project
Id string Deploy the app v2 within project ID (string)
- repo
Name string Repo name (string)
- system
Default stringRegistry (Computed) The system default registry of the app (string)
- values string
The app v2 values yaml. Yaml format is required (string)
- wait boolean
Wait until app is deployed. Default:
true
(bool)
- annotations Mapping[str, Any]
Annotations for the app v2 (map)
- chart_
name str The app v2 chart name (string)
- chart_
version str The app v2 chart version (string)
- cleanup_
on_ boolfail Cleanup app v2 on failed chart upgrade. Default:
false
(bool)- cluster_
id str The cluster id of the app (string)
- cluster_
name str (Computed) The cluster name of the app (string)
- deployment_
values str Values YAML file including computed values. This field prevents incorrect discrepancies from showing in the terraform plan output when files change but values stay the same, due to additional computed values included by the provider itself.
- disable_
hooks bool Disable app v2 chart hooks. Default:
false
(bool)- disable_
open_ boolapi_ validation Disable app V2 Open API Validation. Default:
false
(bool)- force_
upgrade bool Force app V2 chart upgrade. Default:
false
(bool)- labels Mapping[str, Any]
Labels for the app v2 (map)
- name str
The name of the app v2 (string)
- namespace str
The namespace of the app v2 (string)
- project_
id str Deploy the app v2 within project ID (string)
- repo_
name str Repo name (string)
- system_
default_ strregistry (Computed) The system default registry of the app (string)
- values str
The app v2 values yaml. Yaml format is required (string)
- wait bool
Wait until app is deployed. Default:
true
(bool)
- annotations Map<Any>
Annotations for the app v2 (map)
- chart
Name String The app v2 chart name (string)
- chart
Version String The app v2 chart version (string)
- cleanup
On BooleanFail Cleanup app v2 on failed chart upgrade. Default:
false
(bool)- cluster
Id String The cluster id of the app (string)
- cluster
Name String (Computed) The cluster name of the app (string)
- deployment
Values String Values YAML file including computed values. This field prevents incorrect discrepancies from showing in the terraform plan output when files change but values stay the same, due to additional computed values included by the provider itself.
- disable
Hooks Boolean Disable app v2 chart hooks. Default:
false
(bool)- disable
Open BooleanApi Validation Disable app V2 Open API Validation. Default:
false
(bool)- force
Upgrade Boolean Force app V2 chart upgrade. Default:
false
(bool)- labels Map<Any>
Labels for the app v2 (map)
- name String
The name of the app v2 (string)
- namespace String
The namespace of the app v2 (string)
- project
Id String Deploy the app v2 within project ID (string)
- repo
Name String Repo name (string)
- system
Default StringRegistry (Computed) The system default registry of the app (string)
- values String
The app v2 values yaml. Yaml format is required (string)
- wait Boolean
Wait until app is deployed. Default:
true
(bool)
Import
V2 apps can be imported using the Rancher cluster ID and App V2 name, which is composed of <namespace>/<application_name>
.
$ pulumi import rancher2:index/appV2:AppV2 foo <CLUSTER_ID>.<APP_V2_NAME>
Package Details
- Repository
- Rancher2 pulumi/pulumi-rancher2
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
rancher2
Terraform Provider.