Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

Catalog

Provides a Rancher v2 Catalog resource. This can be used to create cluster, global and/or project catalogs for Rancher v2 environments and retrieve their information.

Example Usage

using Pulumi;
using Rancher2 = Pulumi.Rancher2;

class MyStack : Stack
{
    public MyStack()
    {
        // Create a new Rancher2 Global Catalog
        var foo_global = new Rancher2.Catalog("foo-global", new Rancher2.CatalogArgs
        {
            Url = "https://<CATALOG_URL>",
        });
        // Create a new Rancher2 Cluster Catalog
        var foo_cluster = new Rancher2.Catalog("foo-cluster", new Rancher2.CatalogArgs
        {
            Scope = "cluster",
            Url = "https://<CATALOG_URL>",
        });
        // Create a new Rancher2 Project Catalog
        var foo_project = new Rancher2.Catalog("foo-project", new Rancher2.CatalogArgs
        {
            Scope = "project",
            Url = "https://<CATALOG_URL>",
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-rancher2/sdk/v2/go/rancher2"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := rancher2.NewCatalog(ctx, "foo_global", &rancher2.CatalogArgs{
            Url: pulumi.String("https://<CATALOG_URL>"),
        })
        if err != nil {
            return err
        }
        _, err = rancher2.NewCatalog(ctx, "foo_cluster", &rancher2.CatalogArgs{
            Scope: pulumi.String("cluster"),
            Url:   pulumi.String("https://<CATALOG_URL>"),
        })
        if err != nil {
            return err
        }
        _, err = rancher2.NewCatalog(ctx, "foo_project", &rancher2.CatalogArgs{
            Scope: pulumi.String("project"),
            Url:   pulumi.String("https://<CATALOG_URL>"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_rancher2 as rancher2

# Create a new Rancher2 Global Catalog
foo_global = rancher2.Catalog("foo-global", url="https://<CATALOG_URL>")
# Create a new Rancher2 Cluster Catalog
foo_cluster = rancher2.Catalog("foo-cluster",
    scope="cluster",
    url="https://<CATALOG_URL>")
# Create a new Rancher2 Project Catalog
foo_project = rancher2.Catalog("foo-project",
    scope="project",
    url="https://<CATALOG_URL>")
import * as pulumi from "@pulumi/pulumi";
import * as rancher2 from "@pulumi/rancher2";

// Create a new Rancher2 Global Catalog
const foo_global = new rancher2.Catalog("foo-global", {
    url: "https://<CATALOG_URL>",
});
// Create a new Rancher2 Cluster Catalog
const foo_cluster = new rancher2.Catalog("foo-cluster", {
    scope: "cluster",
    url: "https://<CATALOG_URL>",
});
// Create a new Rancher2 Project Catalog
const foo_project = new rancher2.Catalog("foo-project", {
    scope: "project",
    url: "https://<CATALOG_URL>",
});

Create a Catalog Resource

new Catalog(name: string, args: CatalogArgs, opts?: CustomResourceOptions);
def Catalog(resource_name: str, opts: Optional[ResourceOptions] = None, annotations: Optional[Mapping[str, Any]] = None, branch: Optional[str] = None, cluster_id: Optional[str] = None, description: Optional[str] = None, kind: Optional[str] = None, labels: Optional[Mapping[str, Any]] = None, name: Optional[str] = None, password: Optional[str] = None, project_id: Optional[str] = None, refresh: Optional[bool] = None, scope: Optional[str] = None, url: Optional[str] = None, username: Optional[str] = None, version: Optional[str] = None)
func NewCatalog(ctx *Context, name string, args CatalogArgs, opts ...ResourceOption) (*Catalog, error)
public Catalog(string name, CatalogArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args CatalogArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args CatalogArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args CatalogArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Catalog Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Catalog resource accepts the following input properties:

Url string

The url of the catalog repo (string)

Annotations Dictionary<string, object>

Annotations for the catalog (map)

Branch string

The branch of the catalog repo to use. Default master (string)

ClusterId string

The cluster id of the catalog. Mandatory if scope = cluster (string)

Description string

A catalog description (string)

Kind string

The kind of the catalog. Just helm by the moment (string)

Labels Dictionary<string, object>

Labels for the catalog (map)

Name string

The name of the catalog (string)

Password string

The password to access the catalog if needed (string)

ProjectId string

The project id of the catalog. Mandatory if scope = project (string)

Refresh bool

Catalog will wait for refresh after tf creation and on every tf read. Default false (bool)

Scope string

The scope of the catalog. cluster, global, and project are supported. Default global (string)

Username string

The username to access the catalog if needed (string)

Version string

Helm version for the catalog. Available options: helm_v2 and helm_v3 (string)

Url string

The url of the catalog repo (string)

Annotations map[string]interface{}

Annotations for the catalog (map)

Branch string

The branch of the catalog repo to use. Default master (string)

ClusterId string

The cluster id of the catalog. Mandatory if scope = cluster (string)

Description string

A catalog description (string)

Kind string

The kind of the catalog. Just helm by the moment (string)

Labels map[string]interface{}

Labels for the catalog (map)

Name string

The name of the catalog (string)

Password string

The password to access the catalog if needed (string)

ProjectId string

The project id of the catalog. Mandatory if scope = project (string)

Refresh bool

Catalog will wait for refresh after tf creation and on every tf read. Default false (bool)

Scope string

The scope of the catalog. cluster, global, and project are supported. Default global (string)

Username string

The username to access the catalog if needed (string)

Version string

Helm version for the catalog. Available options: helm_v2 and helm_v3 (string)

url string

The url of the catalog repo (string)

annotations {[key: string]: any}

Annotations for the catalog (map)

branch string

The branch of the catalog repo to use. Default master (string)

clusterId string

The cluster id of the catalog. Mandatory if scope = cluster (string)

description string

A catalog description (string)

kind string

The kind of the catalog. Just helm by the moment (string)

labels {[key: string]: any}

Labels for the catalog (map)

name string

The name of the catalog (string)

password string

The password to access the catalog if needed (string)

projectId string

The project id of the catalog. Mandatory if scope = project (string)

refresh boolean

Catalog will wait for refresh after tf creation and on every tf read. Default false (bool)

scope string

The scope of the catalog. cluster, global, and project are supported. Default global (string)

username string

The username to access the catalog if needed (string)

version string

Helm version for the catalog. Available options: helm_v2 and helm_v3 (string)

url str

The url of the catalog repo (string)

annotations Mapping[str, Any]

Annotations for the catalog (map)

branch str

The branch of the catalog repo to use. Default master (string)

cluster_id str

The cluster id of the catalog. Mandatory if scope = cluster (string)

description str

A catalog description (string)

kind str

The kind of the catalog. Just helm by the moment (string)

labels Mapping[str, Any]

Labels for the catalog (map)

name str

The name of the catalog (string)

password str

The password to access the catalog if needed (string)

project_id str

The project id of the catalog. Mandatory if scope = project (string)

refresh bool

Catalog will wait for refresh after tf creation and on every tf read. Default false (bool)

scope str

The scope of the catalog. cluster, global, and project are supported. Default global (string)

username str

The username to access the catalog if needed (string)

version str

Helm version for the catalog. Available options: helm_v2 and helm_v3 (string)

Outputs

All input properties are implicitly available as output properties. Additionally, the Catalog resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing Catalog Resource

Get an existing Catalog 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?: CatalogState, opts?: CustomResourceOptions): Catalog
@staticmethod
def get(resource_name: str, id: str, opts: Optional[ResourceOptions] = None, annotations: Optional[Mapping[str, Any]] = None, branch: Optional[str] = None, cluster_id: Optional[str] = None, description: Optional[str] = None, kind: Optional[str] = None, labels: Optional[Mapping[str, Any]] = None, name: Optional[str] = None, password: Optional[str] = None, project_id: Optional[str] = None, refresh: Optional[bool] = None, scope: Optional[str] = None, url: Optional[str] = None, username: Optional[str] = None, version: Optional[str] = None) -> Catalog
func GetCatalog(ctx *Context, name string, id IDInput, state *CatalogState, opts ...ResourceOption) (*Catalog, error)
public static Catalog Get(string name, Input<string> id, CatalogState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

Annotations Dictionary<string, object>

Annotations for the catalog (map)

Branch string

The branch of the catalog repo to use. Default master (string)

ClusterId string

The cluster id of the catalog. Mandatory if scope = cluster (string)

Description string

A catalog description (string)

Kind string

The kind of the catalog. Just helm by the moment (string)

Labels Dictionary<string, object>

Labels for the catalog (map)

Name string

The name of the catalog (string)

Password string

The password to access the catalog if needed (string)

ProjectId string

The project id of the catalog. Mandatory if scope = project (string)

Refresh bool

Catalog will wait for refresh after tf creation and on every tf read. Default false (bool)

Scope string

The scope of the catalog. cluster, global, and project are supported. Default global (string)

Url string

The url of the catalog repo (string)

Username string

The username to access the catalog if needed (string)

Version string

Helm version for the catalog. Available options: helm_v2 and helm_v3 (string)

Annotations map[string]interface{}

Annotations for the catalog (map)

Branch string

The branch of the catalog repo to use. Default master (string)

ClusterId string

The cluster id of the catalog. Mandatory if scope = cluster (string)

Description string

A catalog description (string)

Kind string

The kind of the catalog. Just helm by the moment (string)

Labels map[string]interface{}

Labels for the catalog (map)

Name string

The name of the catalog (string)

Password string

The password to access the catalog if needed (string)

ProjectId string

The project id of the catalog. Mandatory if scope = project (string)

Refresh bool

Catalog will wait for refresh after tf creation and on every tf read. Default false (bool)

Scope string

The scope of the catalog. cluster, global, and project are supported. Default global (string)

Url string

The url of the catalog repo (string)

Username string

The username to access the catalog if needed (string)

Version string

Helm version for the catalog. Available options: helm_v2 and helm_v3 (string)

annotations {[key: string]: any}

Annotations for the catalog (map)

branch string

The branch of the catalog repo to use. Default master (string)

clusterId string

The cluster id of the catalog. Mandatory if scope = cluster (string)

description string

A catalog description (string)

kind string

The kind of the catalog. Just helm by the moment (string)

labels {[key: string]: any}

Labels for the catalog (map)

name string

The name of the catalog (string)

password string

The password to access the catalog if needed (string)

projectId string

The project id of the catalog. Mandatory if scope = project (string)

refresh boolean

Catalog will wait for refresh after tf creation and on every tf read. Default false (bool)

scope string

The scope of the catalog. cluster, global, and project are supported. Default global (string)

url string

The url of the catalog repo (string)

username string

The username to access the catalog if needed (string)

version string

Helm version for the catalog. Available options: helm_v2 and helm_v3 (string)

annotations Mapping[str, Any]

Annotations for the catalog (map)

branch str

The branch of the catalog repo to use. Default master (string)

cluster_id str

The cluster id of the catalog. Mandatory if scope = cluster (string)

description str

A catalog description (string)

kind str

The kind of the catalog. Just helm by the moment (string)

labels Mapping[str, Any]

Labels for the catalog (map)

name str

The name of the catalog (string)

password str

The password to access the catalog if needed (string)

project_id str

The project id of the catalog. Mandatory if scope = project (string)

refresh bool

Catalog will wait for refresh after tf creation and on every tf read. Default false (bool)

scope str

The scope of the catalog. cluster, global, and project are supported. Default global (string)

url str

The url of the catalog repo (string)

username str

The username to access the catalog if needed (string)

version str

Helm version for the catalog. Available options: helm_v2 and helm_v3 (string)

Import

Catalogs can be imported using the Rancher Catalog ID and its scope.

 $ pulumi import rancher2:index/catalog:Catalog foo &lt;SCOPE&gt;.&lt;CATALOG_ID_ID&gt;

Package Details

Repository
https://github.com/pulumi/pulumi-rancher2
License
Apache-2.0
Notes
This Pulumi package is based on the rancher2 Terraform Provider.