Chart Namespace
Provides a CR Chart Namespace resource. For information about CR Chart Namespace and how to use it, see What is Chart Namespace.
NOTE: Available since v1.149.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "example-name";
const example = new alicloud.cr.RegistryEnterpriseInstance("example", {
paymentType: "Subscription",
period: 1,
renewPeriod: 0,
renewalStatus: "ManualRenewal",
instanceType: "Advanced",
instanceName: name,
});
const exampleChartNamespace = new alicloud.cr.ChartNamespace("example", {
instanceId: example.id,
namespaceName: name,
});Content copied to clipboard
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "example-name"
example = alicloud.cr.RegistryEnterpriseInstance("example",
payment_type="Subscription",
period=1,
renew_period=0,
renewal_status="ManualRenewal",
instance_type="Advanced",
instance_name=name)
example_chart_namespace = alicloud.cr.ChartNamespace("example",
instance_id=example.id,
namespace_name=name)Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "example-name";
var example = new AliCloud.CR.RegistryEnterpriseInstance("example", new()
{
PaymentType = "Subscription",
Period = 1,
RenewPeriod = 0,
RenewalStatus = "ManualRenewal",
InstanceType = "Advanced",
InstanceName = name,
});
var exampleChartNamespace = new AliCloud.CR.ChartNamespace("example", new()
{
InstanceId = example.Id,
NamespaceName = name,
});
});Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cr"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "example-name"
if param := cfg.Get("name"); param != "" {
name = param
}
example, err := cr.NewRegistryEnterpriseInstance(ctx, "example", &cr.RegistryEnterpriseInstanceArgs{
PaymentType: pulumi.String("Subscription"),
Period: pulumi.Int(1),
RenewPeriod: pulumi.Int(0),
RenewalStatus: pulumi.String("ManualRenewal"),
InstanceType: pulumi.String("Advanced"),
InstanceName: pulumi.String(name),
})
if err != nil {
return err
}
_, err = cr.NewChartNamespace(ctx, "example", &cr.ChartNamespaceArgs{
InstanceId: example.ID(),
NamespaceName: pulumi.String(name),
})
if err != nil {
return err
}
return nil
})
}Content copied to clipboard
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 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) {
final var config = ctx.config();
final var name = config.get("name").orElse("example-name");
var example = new RegistryEnterpriseInstance("example", RegistryEnterpriseInstanceArgs.builder()
.paymentType("Subscription")
.period(1)
.renewPeriod(0)
.renewalStatus("ManualRenewal")
.instanceType("Advanced")
.instanceName(name)
.build());
var exampleChartNamespace = new ChartNamespace("exampleChartNamespace", ChartNamespaceArgs.builder()
.instanceId(example.id())
.namespaceName(name)
.build());
}
}Content copied to clipboard
configuration:
name:
type: string
default: example-name
resources:
example:
type: alicloud:cr:RegistryEnterpriseInstance
properties:
paymentType: Subscription
period: 1
renewPeriod: 0
renewalStatus: ManualRenewal
instanceType: Advanced
instanceName: ${name}
exampleChartNamespace:
type: alicloud:cr:ChartNamespace
name: example
properties:
instanceId: ${example.id}
namespaceName: ${name}Content copied to clipboard
Import
CR Chart Namespace can be imported using the id, e.g.
$ pulumi import alicloud:cr/chartNamespace:ChartNamespace example <instance_id>:<namespace_name>Content copied to clipboard
Properties
Link copied to clipboard
Specifies whether to automatically create repositories in the namespace. Valid values:
Link copied to clipboard
DefaultRepoType. Valid values: PRIVATE, PUBLIC.
Link copied to clipboard
The ID of the Container Registry instance.
Link copied to clipboard
The name of the namespace that you want to create.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard