1. Packages
  2. Rancher2
  3. API Docs
  4. Catalog
Rancher 2 v6.1.0 published on Tuesday, Mar 12, 2024 by Pulumi

rancher2.Catalog

Explore with Pulumi AI

rancher2 logo
Rancher 2 v6.1.0 published on Tuesday, Mar 12, 2024 by Pulumi

    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

    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>",
    });
    
    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>")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-rancher2/sdk/v6/go/rancher2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Create a new Rancher2 Global Catalog
    		_, err := rancher2.NewCatalog(ctx, "foo-global", &rancher2.CatalogArgs{
    			Url: pulumi.String("https://<CATALOG_URL>"),
    		})
    		if err != nil {
    			return err
    		}
    		// Create a new Rancher2 Cluster Catalog
    		_, err = rancher2.NewCatalog(ctx, "foo-cluster", &rancher2.CatalogArgs{
    			Scope: pulumi.String("cluster"),
    			Url:   pulumi.String("https://<CATALOG_URL>"),
    		})
    		if err != nil {
    			return err
    		}
    		// Create a new Rancher2 Project Catalog
    		_, 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
    	})
    }
    
    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 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());
    
        }
    }
    
    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

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Catalog(name: string, args: CatalogArgs, opts?: CustomResourceOptions);
    @overload
    def Catalog(resource_name: str,
                args: CatalogArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Catalog(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                url: Optional[str] = None,
                name: Optional[str] = None,
                cluster_id: Optional[str] = None,
                description: Optional[str] = None,
                kind: Optional[str] = None,
                labels: Optional[Mapping[str, Any]] = None,
                annotations: Optional[Mapping[str, Any]] = None,
                password: Optional[str] = None,
                project_id: Optional[str] = None,
                refresh: Optional[bool] = None,
                scope: Optional[str] = None,
                branch: 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)
    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.
    
    

    Parameters

    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.

    Example

    The following reference example uses placeholder values for all input properties.

    var catalogResource = new Rancher2.Catalog("catalogResource", new()
    {
        Url = "string",
        Name = "string",
        ClusterId = "string",
        Description = "string",
        Kind = "string",
        Labels = 
        {
            { "string", "any" },
        },
        Annotations = 
        {
            { "string", "any" },
        },
        Password = "string",
        ProjectId = "string",
        Refresh = false,
        Scope = "string",
        Branch = "string",
        Username = "string",
        Version = "string",
    });
    
    example, err := rancher2.NewCatalog(ctx, "catalogResource", &rancher2.CatalogArgs{
    	Url:         pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	ClusterId:   pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Kind:        pulumi.String("string"),
    	Labels: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	Annotations: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	Password:  pulumi.String("string"),
    	ProjectId: pulumi.String("string"),
    	Refresh:   pulumi.Bool(false),
    	Scope:     pulumi.String("string"),
    	Branch:    pulumi.String("string"),
    	Username:  pulumi.String("string"),
    	Version:   pulumi.String("string"),
    })
    
    var catalogResource = new Catalog("catalogResource", CatalogArgs.builder()        
        .url("string")
        .name("string")
        .clusterId("string")
        .description("string")
        .kind("string")
        .labels(Map.of("string", "any"))
        .annotations(Map.of("string", "any"))
        .password("string")
        .projectId("string")
        .refresh(false)
        .scope("string")
        .branch("string")
        .username("string")
        .version("string")
        .build());
    
    catalog_resource = rancher2.Catalog("catalogResource",
        url="string",
        name="string",
        cluster_id="string",
        description="string",
        kind="string",
        labels={
            "string": "any",
        },
        annotations={
            "string": "any",
        },
        password="string",
        project_id="string",
        refresh=False,
        scope="string",
        branch="string",
        username="string",
        version="string")
    
    const catalogResource = new rancher2.Catalog("catalogResource", {
        url: "string",
        name: "string",
        clusterId: "string",
        description: "string",
        kind: "string",
        labels: {
            string: "any",
        },
        annotations: {
            string: "any",
        },
        password: "string",
        projectId: "string",
        refresh: false,
        scope: "string",
        branch: "string",
        username: "string",
        version: "string",
    });
    
    type: rancher2:Catalog
    properties:
        annotations:
            string: any
        branch: string
        clusterId: string
        description: string
        kind: string
        labels:
            string: any
        name: string
        password: string
        projectId: string
        refresh: false
        scope: string
        url: string
        username: string
        version: string
    

    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;
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Rancher2 pulumi/pulumi-rancher2
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the rancher2 Terraform Provider.
    rancher2 logo
    Rancher 2 v6.1.0 published on Tuesday, Mar 12, 2024 by Pulumi