ChartRepository

Provides a CR Chart Repository resource.

For information about CR Chart Repository and how to use it, see What is Chart Repository.

NOTE: Available in v1.149.0+.

Example Usage

Basic Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var defaultRegistryEnterpriseInstance = new AliCloud.CR.RegistryEnterpriseInstance("defaultRegistryEnterpriseInstance", new AliCloud.CR.RegistryEnterpriseInstanceArgs
        {
            PaymentType = "Subscription",
            Period = 1,
            InstanceType = "Advanced",
            InstanceName = "name",
        });
        var defaultChartNamespace = new AliCloud.CR.ChartNamespace("defaultChartNamespace", new AliCloud.CR.ChartNamespaceArgs
        {
            InstanceId = defaultRegistryEnterpriseInstance.Id,
            NamespaceName = "name",
        });
        var defaultChartRepository = new AliCloud.CR.ChartRepository("defaultChartRepository", new AliCloud.CR.ChartRepositoryArgs
        {
            RepoNamespaceName = defaultChartNamespace.NamespaceName,
            InstanceId = local.Instance,
            RepoName = "repo_name",
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cr"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		defaultRegistryEnterpriseInstance, err := cr.NewRegistryEnterpriseInstance(ctx, "defaultRegistryEnterpriseInstance", &cr.RegistryEnterpriseInstanceArgs{
			PaymentType:  pulumi.String("Subscription"),
			Period:       pulumi.Int(1),
			InstanceType: pulumi.String("Advanced"),
			InstanceName: pulumi.String("name"),
		})
		if err != nil {
			return err
		}
		defaultChartNamespace, err := cr.NewChartNamespace(ctx, "defaultChartNamespace", &cr.ChartNamespaceArgs{
			InstanceId:    defaultRegistryEnterpriseInstance.ID(),
			NamespaceName: pulumi.String("name"),
		})
		if err != nil {
			return err
		}
		_, err = cr.NewChartRepository(ctx, "defaultChartRepository", &cr.ChartRepositoryArgs{
			RepoNamespaceName: defaultChartNamespace.NamespaceName,
			InstanceId:        pulumi.Any(local.Instance),
			RepoName:          pulumi.String("repo_name"),
		})
		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.alicloud.cr.RegistryEnterpriseInstance;
import com.pulumi.alicloud.cr.RegistryEnterpriseInstanceArgs;
import com.pulumi.alicloud.cr.ChartNamespace;
import com.pulumi.alicloud.cr.ChartNamespaceArgs;
import com.pulumi.alicloud.cr.ChartRepository;
import com.pulumi.alicloud.cr.ChartRepositoryArgs;
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 defaultRegistryEnterpriseInstance = new RegistryEnterpriseInstance("defaultRegistryEnterpriseInstance", RegistryEnterpriseInstanceArgs.builder()        
            .paymentType("Subscription")
            .period(1)
            .instanceType("Advanced")
            .instanceName("name")
            .build());

        var defaultChartNamespace = new ChartNamespace("defaultChartNamespace", ChartNamespaceArgs.builder()        
            .instanceId(defaultRegistryEnterpriseInstance.id())
            .namespaceName("name")
            .build());

        var defaultChartRepository = new ChartRepository("defaultChartRepository", ChartRepositoryArgs.builder()        
            .repoNamespaceName(defaultChartNamespace.namespaceName())
            .instanceId(local.instance())
            .repoName("repo_name")
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

default_registry_enterprise_instance = alicloud.cr.RegistryEnterpriseInstance("defaultRegistryEnterpriseInstance",
    payment_type="Subscription",
    period=1,
    instance_type="Advanced",
    instance_name="name")
default_chart_namespace = alicloud.cr.ChartNamespace("defaultChartNamespace",
    instance_id=default_registry_enterprise_instance.id,
    namespace_name="name")
default_chart_repository = alicloud.cr.ChartRepository("defaultChartRepository",
    repo_namespace_name=default_chart_namespace.namespace_name,
    instance_id=local["instance"],
    repo_name="repo_name")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const defaultRegistryEnterpriseInstance = new alicloud.cr.RegistryEnterpriseInstance("defaultRegistryEnterpriseInstance", {
    paymentType: "Subscription",
    period: 1,
    instanceType: "Advanced",
    instanceName: "name",
});
const defaultChartNamespace = new alicloud.cr.ChartNamespace("defaultChartNamespace", {
    instanceId: defaultRegistryEnterpriseInstance.id,
    namespaceName: "name",
});
const defaultChartRepository = new alicloud.cr.ChartRepository("defaultChartRepository", {
    repoNamespaceName: defaultChartNamespace.namespaceName,
    instanceId: local.instance,
    repoName: "repo_name",
});
resources:
  defaultRegistryEnterpriseInstance:
    type: alicloud:cr:RegistryEnterpriseInstance
    properties:
      paymentType: Subscription
      period: 1
      instanceType: Advanced
      instanceName: name
  defaultChartNamespace:
    type: alicloud:cr:ChartNamespace
    properties:
      instanceId: ${defaultRegistryEnterpriseInstance.id}
      namespaceName: name
  defaultChartRepository:
    type: alicloud:cr:ChartRepository
    properties:
      repoNamespaceName: ${defaultChartNamespace.namespaceName}
      instanceId: ${local.instance}
      repoName: repo_name

Create ChartRepository Resource

new ChartRepository(name: string, args: ChartRepositoryArgs, opts?: CustomResourceOptions);
@overload
def ChartRepository(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    instance_id: Optional[str] = None,
                    repo_name: Optional[str] = None,
                    repo_namespace_name: Optional[str] = None,
                    repo_type: Optional[str] = None,
                    summary: Optional[str] = None)
@overload
def ChartRepository(resource_name: str,
                    args: ChartRepositoryArgs,
                    opts: Optional[ResourceOptions] = None)
func NewChartRepository(ctx *Context, name string, args ChartRepositoryArgs, opts ...ResourceOption) (*ChartRepository, error)
public ChartRepository(string name, ChartRepositoryArgs args, CustomResourceOptions? opts = null)
public ChartRepository(String name, ChartRepositoryArgs args)
public ChartRepository(String name, ChartRepositoryArgs args, CustomResourceOptions options)
type: alicloud:cr:ChartRepository
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args ChartRepositoryArgs
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 ChartRepositoryArgs
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 ChartRepositoryArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ChartRepositoryArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args ChartRepositoryArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

ChartRepository 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 ChartRepository resource accepts the following input properties:

InstanceId string

The ID of the Container Registry instance.

RepoName string

The name of the repository that you want to create.

RepoNamespaceName string

The namespace to which the repository belongs.

RepoType string

The default repository type. Valid values: PUBLIC,PRIVATE.

Summary string

The summary about the repository.

InstanceId string

The ID of the Container Registry instance.

RepoName string

The name of the repository that you want to create.

RepoNamespaceName string

The namespace to which the repository belongs.

RepoType string

The default repository type. Valid values: PUBLIC,PRIVATE.

Summary string

The summary about the repository.

instanceId String

The ID of the Container Registry instance.

repoName String

The name of the repository that you want to create.

repoNamespaceName String

The namespace to which the repository belongs.

repoType String

The default repository type. Valid values: PUBLIC,PRIVATE.

summary String

The summary about the repository.

instanceId string

The ID of the Container Registry instance.

repoName string

The name of the repository that you want to create.

repoNamespaceName string

The namespace to which the repository belongs.

repoType string

The default repository type. Valid values: PUBLIC,PRIVATE.

summary string

The summary about the repository.

instance_id str

The ID of the Container Registry instance.

repo_name str

The name of the repository that you want to create.

repo_namespace_name str

The namespace to which the repository belongs.

repo_type str

The default repository type. Valid values: PUBLIC,PRIVATE.

summary str

The summary about the repository.

instanceId String

The ID of the Container Registry instance.

repoName String

The name of the repository that you want to create.

repoNamespaceName String

The namespace to which the repository belongs.

repoType String

The default repository type. Valid values: PUBLIC,PRIVATE.

summary String

The summary about the repository.

Outputs

All input properties are implicitly available as output properties. Additionally, the ChartRepository 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 ChartRepository Resource

Get an existing ChartRepository 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?: ChartRepositoryState, opts?: CustomResourceOptions): ChartRepository
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        instance_id: Optional[str] = None,
        repo_name: Optional[str] = None,
        repo_namespace_name: Optional[str] = None,
        repo_type: Optional[str] = None,
        summary: Optional[str] = None) -> ChartRepository
func GetChartRepository(ctx *Context, name string, id IDInput, state *ChartRepositoryState, opts ...ResourceOption) (*ChartRepository, error)
public static ChartRepository Get(string name, Input<string> id, ChartRepositoryState? state, CustomResourceOptions? opts = null)
public static ChartRepository get(String name, Output<String> id, ChartRepositoryState 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:
InstanceId string

The ID of the Container Registry instance.

RepoName string

The name of the repository that you want to create.

RepoNamespaceName string

The namespace to which the repository belongs.

RepoType string

The default repository type. Valid values: PUBLIC,PRIVATE.

Summary string

The summary about the repository.

InstanceId string

The ID of the Container Registry instance.

RepoName string

The name of the repository that you want to create.

RepoNamespaceName string

The namespace to which the repository belongs.

RepoType string

The default repository type. Valid values: PUBLIC,PRIVATE.

Summary string

The summary about the repository.

instanceId String

The ID of the Container Registry instance.

repoName String

The name of the repository that you want to create.

repoNamespaceName String

The namespace to which the repository belongs.

repoType String

The default repository type. Valid values: PUBLIC,PRIVATE.

summary String

The summary about the repository.

instanceId string

The ID of the Container Registry instance.

repoName string

The name of the repository that you want to create.

repoNamespaceName string

The namespace to which the repository belongs.

repoType string

The default repository type. Valid values: PUBLIC,PRIVATE.

summary string

The summary about the repository.

instance_id str

The ID of the Container Registry instance.

repo_name str

The name of the repository that you want to create.

repo_namespace_name str

The namespace to which the repository belongs.

repo_type str

The default repository type. Valid values: PUBLIC,PRIVATE.

summary str

The summary about the repository.

instanceId String

The ID of the Container Registry instance.

repoName String

The name of the repository that you want to create.

repoNamespaceName String

The namespace to which the repository belongs.

repoType String

The default repository type. Valid values: PUBLIC,PRIVATE.

summary String

The summary about the repository.

Import

CR Chart Repository can be imported using the id, e.g.

 $ pulumi import alicloud:cr/chartRepository:ChartRepository example <instance_id>:<repo_namespace_name>:<repo_name>

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.