rancher2 logo
Rancher 2 v4.0.0, Apr 20 23

rancher2.Catalog

Explore with Pulumi AI

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 System.Collections.Generic;
using System.Linq;
using Pulumi;
using Rancher2 = Pulumi.Rancher2;

return await Deployment.RunAsync(() => 
{
    // Create a new Rancher2 Global Catalog
    var foo_global = new Rancher2.Catalog("foo-global", new()
    {
        Url = "https://<CATALOG_URL>",
    });

    // Create a new Rancher2 Cluster Catalog
    var foo_cluster = new Rancher2.Catalog("foo-cluster", new()
    {
        Scope = "cluster",
        Url = "https://<CATALOG_URL>",
    });

    // Create a new Rancher2 Project Catalog
    var foo_project = new Rancher2.Catalog("foo-project", new()
    {
        Scope = "project",
        Url = "https://<CATALOG_URL>",
    });

});
package main

import (
	"github.com/pulumi/pulumi-rancher2/sdk/v4/go/rancher2"
	"github.com/pulumi/pulumi/sdk/v3/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
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.rancher2.Catalog;
import com.pulumi.rancher2.CatalogArgs;
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_global = new Catalog("foo-global", CatalogArgs.builder()        
            .url("https://<CATALOG_URL>")
            .build());

        var foo_cluster = new Catalog("foo-cluster", CatalogArgs.builder()        
            .scope("cluster")
            .url("https://<CATALOG_URL>")
            .build());

        var foo_project = new Catalog("foo-project", CatalogArgs.builder()        
            .scope("project")
            .url("https://<CATALOG_URL>")
            .build());

    }
}
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>",
});
resources:
  # Create a new Rancher2 Global Catalog
  foo-global:
    type: rancher2:Catalog
    properties:
      url: https://<CATALOG_URL>
  # Create a new Rancher2 Cluster Catalog
  foo-cluster:
    type: rancher2:Catalog
    properties:
      scope: cluster
      url: https://<CATALOG_URL>
  # Create a new Rancher2 Project Catalog
  foo-project:
    type: rancher2:Catalog
    properties:
      scope: project
      url: https://<CATALOG_URL>

Create Catalog Resource

new Catalog(name: string, args: CatalogArgs, opts?: CustomResourceOptions);
@overload
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)
@overload
def Catalog(resource_name: str,
            args: CatalogArgs,
            opts: Optional[ResourceOptions] = None)
func NewCatalog(ctx *Context, name string, args CatalogArgs, opts ...ResourceOption) (*Catalog, error)
public Catalog(string name, CatalogArgs args, CustomResourceOptions? opts = null)
public Catalog(String name, CatalogArgs args)
public Catalog(String name, CatalogArgs args, CustomResourceOptions options)
type: rancher2:Catalog
properties: # The arguments to resource properties.
options: # 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.
resource_name str
The unique name of the resource.
args CatalogArgs
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 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.
name String
The unique name of the resource.
args CatalogArgs
The arguments to resource properties.
options 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 Architecture and Concepts 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 Map<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 Map<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 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 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)

url String

The url of the catalog repo (string)

annotations Map<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 Map<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)

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 string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up 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)
public static Catalog get(String name, Output<String> id, CatalogState 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.
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 Map<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 Map<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 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 {[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)

annotations Map<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 Map<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)

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
Rancher2 pulumi/pulumi-rancher2
License
Apache-2.0
Notes

This Pulumi package is based on the rancher2 Terraform Provider.