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
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", {
name: "foo-global",
url: "https://<CATALOG_URL>",
});
// Create a new Rancher2 Cluster Catalog
const foo_cluster = new rancher2.Catalog("foo-cluster", {
name: "foo-cluster",
url: "https://<CATALOG_URL>",
scope: "cluster",
});
// Create a new Rancher2 Project Catalog
const foo_project = new rancher2.Catalog("foo-project", {
name: "foo-project",
url: "https://<CATALOG_URL>",
scope: "project",
});
import pulumi
import pulumi_rancher2 as rancher2
# Create a new Rancher2 Global Catalog
foo_global = rancher2.Catalog("foo-global",
name="foo-global",
url="https://<CATALOG_URL>")
# Create a new Rancher2 Cluster Catalog
foo_cluster = rancher2.Catalog("foo-cluster",
name="foo-cluster",
url="https://<CATALOG_URL>",
scope="cluster")
# Create a new Rancher2 Project Catalog
foo_project = rancher2.Catalog("foo-project",
name="foo-project",
url="https://<CATALOG_URL>",
scope="project")
package main
import (
"github.com/pulumi/pulumi-rancher2/sdk/v7/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{
Name: pulumi.String("foo-global"),
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{
Name: pulumi.String("foo-cluster"),
Url: pulumi.String("https://<CATALOG_URL>"),
Scope: pulumi.String("cluster"),
})
if err != nil {
return err
}
// Create a new Rancher2 Project Catalog
_, err = rancher2.NewCatalog(ctx, "foo-project", &rancher2.CatalogArgs{
Name: pulumi.String("foo-project"),
Url: pulumi.String("https://<CATALOG_URL>"),
Scope: pulumi.String("project"),
})
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()
{
Name = "foo-global",
Url = "https://<CATALOG_URL>",
});
// Create a new Rancher2 Cluster Catalog
var foo_cluster = new Rancher2.Catalog("foo-cluster", new()
{
Name = "foo-cluster",
Url = "https://<CATALOG_URL>",
Scope = "cluster",
});
// Create a new Rancher2 Project Catalog
var foo_project = new Rancher2.Catalog("foo-project", new()
{
Name = "foo-project",
Url = "https://<CATALOG_URL>",
Scope = "project",
});
});
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) {
// Create a new Rancher2 Global Catalog
var foo_global = new Catalog("foo-global", CatalogArgs.builder()
.name("foo-global")
.url("https://<CATALOG_URL>")
.build());
// Create a new Rancher2 Cluster Catalog
var foo_cluster = new Catalog("foo-cluster", CatalogArgs.builder()
.name("foo-cluster")
.url("https://<CATALOG_URL>")
.scope("cluster")
.build());
// Create a new Rancher2 Project Catalog
var foo_project = new Catalog("foo-project", CatalogArgs.builder()
.name("foo-project")
.url("https://<CATALOG_URL>")
.scope("project")
.build());
}
}
resources:
# Create a new Rancher2 Global Catalog
foo-global:
type: rancher2:Catalog
properties:
name: foo-global
url: https://<CATALOG_URL>
# Create a new Rancher2 Cluster Catalog
foo-cluster:
type: rancher2:Catalog
properties:
name: foo-cluster
url: https://<CATALOG_URL>
scope: cluster
# Create a new Rancher2 Project Catalog
foo-project:
type: rancher2:Catalog
properties:
name: foo-project
url: https://<CATALOG_URL>
scope: project
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, str]] = None,
annotations: Optional[Mapping[str, str]] = 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.
Constructor 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", "string" },
},
Annotations =
{
{ "string", "string" },
},
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.StringMap{
"string": pulumi.String("string"),
},
Annotations: pulumi.StringMap{
"string": pulumi.String("string"),
},
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", "string"))
.annotations(Map.of("string", "string"))
.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": "string",
},
annotations={
"string": "string",
},
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: "string",
},
annotations: {
string: "string",
},
password: "string",
projectId: "string",
refresh: false,
scope: "string",
branch: "string",
username: "string",
version: "string",
});
type: rancher2:Catalog
properties:
annotations:
string: string
branch: string
clusterId: string
description: string
kind: string
labels:
string: string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Catalog resource accepts the following input properties:
- Url string
- The url of the catalog repo (string)
- Annotations Dictionary<string, string>
- Annotations for the catalog (map)
- Branch string
- The branch of the catalog repo to use. Default
master
(string) - Cluster
Id 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, string>
- Labels for the catalog (map)
- Name string
- The name of the catalog (string)
- Password string
- The password to access the catalog if needed (string)
- Project
Id 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
, andproject
are supported. Defaultglobal
(string) - Username string
- The username to access the catalog if needed (string)
- Version string
- Helm version for the catalog. Available options:
helm_v2
andhelm_v3
(string)
- Url string
- The url of the catalog repo (string)
- Annotations map[string]string
- Annotations for the catalog (map)
- Branch string
- The branch of the catalog repo to use. Default
master
(string) - Cluster
Id 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]string
- Labels for the catalog (map)
- Name string
- The name of the catalog (string)
- Password string
- The password to access the catalog if needed (string)
- Project
Id 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
, andproject
are supported. Defaultglobal
(string) - Username string
- The username to access the catalog if needed (string)
- Version string
- Helm version for the catalog. Available options:
helm_v2
andhelm_v3
(string)
- url String
- The url of the catalog repo (string)
- annotations Map<String,String>
- Annotations for the catalog (map)
- branch String
- The branch of the catalog repo to use. Default
master
(string) - cluster
Id 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,String>
- Labels for the catalog (map)
- name String
- The name of the catalog (string)
- password String
- The password to access the catalog if needed (string)
- project
Id 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
, andproject
are supported. Defaultglobal
(string) - username String
- The username to access the catalog if needed (string)
- version String
- Helm version for the catalog. Available options:
helm_v2
andhelm_v3
(string)
- url string
- The url of the catalog repo (string)
- annotations {[key: string]: string}
- Annotations for the catalog (map)
- branch string
- The branch of the catalog repo to use. Default
master
(string) - cluster
Id 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]: string}
- Labels for the catalog (map)
- name string
- The name of the catalog (string)
- password string
- The password to access the catalog if needed (string)
- project
Id 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
, andproject
are supported. Defaultglobal
(string) - username string
- The username to access the catalog if needed (string)
- version string
- Helm version for the catalog. Available options:
helm_v2
andhelm_v3
(string)
- url str
- The url of the catalog repo (string)
- annotations Mapping[str, str]
- 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, str]
- 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
, andproject
are supported. Defaultglobal
(string) - username str
- The username to access the catalog if needed (string)
- version str
- Helm version for the catalog. Available options:
helm_v2
andhelm_v3
(string)
- url String
- The url of the catalog repo (string)
- annotations Map<String>
- Annotations for the catalog (map)
- branch String
- The branch of the catalog repo to use. Default
master
(string) - cluster
Id 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>
- Labels for the catalog (map)
- name String
- The name of the catalog (string)
- password String
- The password to access the catalog if needed (string)
- project
Id 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
, andproject
are supported. Defaultglobal
(string) - username String
- The username to access the catalog if needed (string)
- version String
- Helm version for the catalog. Available options:
helm_v2
andhelm_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, str]] = None,
branch: Optional[str] = None,
cluster_id: Optional[str] = None,
description: Optional[str] = None,
kind: Optional[str] = None,
labels: Optional[Mapping[str, str]] = 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.
- Annotations Dictionary<string, string>
- Annotations for the catalog (map)
- Branch string
- The branch of the catalog repo to use. Default
master
(string) - Cluster
Id 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, string>
- Labels for the catalog (map)
- Name string
- The name of the catalog (string)
- Password string
- The password to access the catalog if needed (string)
- Project
Id 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
, andproject
are supported. Defaultglobal
(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
andhelm_v3
(string)
- Annotations map[string]string
- Annotations for the catalog (map)
- Branch string
- The branch of the catalog repo to use. Default
master
(string) - Cluster
Id 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]string
- Labels for the catalog (map)
- Name string
- The name of the catalog (string)
- Password string
- The password to access the catalog if needed (string)
- Project
Id 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
, andproject
are supported. Defaultglobal
(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
andhelm_v3
(string)
- annotations Map<String,String>
- Annotations for the catalog (map)
- branch String
- The branch of the catalog repo to use. Default
master
(string) - cluster
Id 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,String>
- Labels for the catalog (map)
- name String
- The name of the catalog (string)
- password String
- The password to access the catalog if needed (string)
- project
Id 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
, andproject
are supported. Defaultglobal
(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
andhelm_v3
(string)
- annotations {[key: string]: string}
- Annotations for the catalog (map)
- branch string
- The branch of the catalog repo to use. Default
master
(string) - cluster
Id 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]: string}
- Labels for the catalog (map)
- name string
- The name of the catalog (string)
- password string
- The password to access the catalog if needed (string)
- project
Id 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
, andproject
are supported. Defaultglobal
(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
andhelm_v3
(string)
- annotations Mapping[str, str]
- 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, str]
- 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
, andproject
are supported. Defaultglobal
(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
andhelm_v3
(string)
- annotations Map<String>
- Annotations for the catalog (map)
- branch String
- The branch of the catalog repo to use. Default
master
(string) - cluster
Id 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>
- Labels for the catalog (map)
- name String
- The name of the catalog (string)
- password String
- The password to access the catalog if needed (string)
- project
Id 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
, andproject
are supported. Defaultglobal
(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
andhelm_v3
(string)
Import
Catalogs can be imported using the Rancher Catalog ID and its scope.
$ pulumi import rancher2:index/catalog:Catalog foo <SCOPE>.<CATALOG_ID_ID>
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.