Alibaba Cloud

v3.10.0 published on Wednesday, Nov 24, 2021 by Pulumi

Repo

This resource will help you to manager Container Registry repositories.

NOTE: Available in v1.35.0+.

NOTE: You need to set your registry password in Container Registry console before use this resource.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var my_namespace = new AliCloud.CR.Namespace("my-namespace", new AliCloud.CR.NamespaceArgs
        {
            AutoCreate = false,
            DefaultVisibility = "PUBLIC",
        });
        var my_repo = new AliCloud.CR.Repo("my-repo", new AliCloud.CR.RepoArgs
        {
            Namespace = my_namespace.Name,
            Summary = "this is summary of my new repo",
            RepoType = "PUBLIC",
            Detail = "this is a public repo",
        });
    }

}
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 {
		_, err := cr.NewNamespace(ctx, "my_namespace", &cr.NamespaceArgs{
			AutoCreate:        pulumi.Bool(false),
			DefaultVisibility: pulumi.String("PUBLIC"),
		})
		if err != nil {
			return err
		}
		_, err = cr.NewRepo(ctx, "my_repo", &cr.RepoArgs{
			Namespace: my_namespace.Name,
			Summary:   pulumi.String("this is summary of my new repo"),
			RepoType:  pulumi.String("PUBLIC"),
			Detail:    pulumi.String("this is a public repo"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_alicloud as alicloud

my_namespace = alicloud.cr.Namespace("my-namespace",
    auto_create=False,
    default_visibility="PUBLIC")
my_repo = alicloud.cr.Repo("my-repo",
    namespace=my_namespace.name,
    summary="this is summary of my new repo",
    repo_type="PUBLIC",
    detail="this is a public repo")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const my_namespace = new alicloud.cr.Namespace("my-namespace", {
    autoCreate: false,
    defaultVisibility: "PUBLIC",
});
const my_repo = new alicloud.cr.Repo("my-repo", {
    namespace: my_namespace.name,
    summary: "this is summary of my new repo",
    repoType: "PUBLIC",
    detail: "this is a public repo",
});

Create a Repo Resource

new Repo(name: string, args: RepoArgs, opts?: CustomResourceOptions);
@overload
def Repo(resource_name: str,
         opts: Optional[ResourceOptions] = None,
         detail: Optional[str] = None,
         name: Optional[str] = None,
         namespace: Optional[str] = None,
         repo_type: Optional[str] = None,
         summary: Optional[str] = None)
@overload
def Repo(resource_name: str,
         args: RepoArgs,
         opts: Optional[ResourceOptions] = None)
func NewRepo(ctx *Context, name string, args RepoArgs, opts ...ResourceOption) (*Repo, error)
public Repo(string name, RepoArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args RepoArgs
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 RepoArgs
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 RepoArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args RepoArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

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

Namespace string
Name of container registry namespace where repository is located.
RepoType string
PUBLIC or PRIVATE, repo’s visibility.
Summary string
The repository general information. It can contain 1 to 80 characters.
Detail string
The repository specific information. MarkDown format is supported, and the length limit is 2000.
Name string
Name of container registry repository.
Namespace string
Name of container registry namespace where repository is located.
RepoType string
PUBLIC or PRIVATE, repo’s visibility.
Summary string
The repository general information. It can contain 1 to 80 characters.
Detail string
The repository specific information. MarkDown format is supported, and the length limit is 2000.
Name string
Name of container registry repository.
namespace string
Name of container registry namespace where repository is located.
repoType string
PUBLIC or PRIVATE, repo’s visibility.
summary string
The repository general information. It can contain 1 to 80 characters.
detail string
The repository specific information. MarkDown format is supported, and the length limit is 2000.
name string
Name of container registry repository.
namespace str
Name of container registry namespace where repository is located.
repo_type str
PUBLIC or PRIVATE, repo’s visibility.
summary str
The repository general information. It can contain 1 to 80 characters.
detail str
The repository specific information. MarkDown format is supported, and the length limit is 2000.
name str
Name of container registry repository.

Outputs

All input properties are implicitly available as output properties. Additionally, the Repo resource produces the following output properties:

DomainList Pulumi.AliCloud.CR.Outputs.RepoDomainList
The repository domain list.
Id string
The provider-assigned unique ID for this managed resource.
DomainList RepoDomainList
The repository domain list.
Id string
The provider-assigned unique ID for this managed resource.
domainList RepoDomainList
The repository domain list.
id string
The provider-assigned unique ID for this managed resource.
domain_list RepoDomainList
The repository domain list.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing Repo Resource

Get an existing Repo 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?: RepoState, opts?: CustomResourceOptions): Repo
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        detail: Optional[str] = None,
        domain_list: Optional[RepoDomainListArgs] = None,
        name: Optional[str] = None,
        namespace: Optional[str] = None,
        repo_type: Optional[str] = None,
        summary: Optional[str] = None) -> Repo
func GetRepo(ctx *Context, name string, id IDInput, state *RepoState, opts ...ResourceOption) (*Repo, error)
public static Repo Get(string name, Input<string> id, RepoState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

Detail string
The repository specific information. MarkDown format is supported, and the length limit is 2000.
DomainList Pulumi.AliCloud.CR.Inputs.RepoDomainListArgs
The repository domain list.
Name string
Name of container registry repository.
Namespace string
Name of container registry namespace where repository is located.
RepoType string
PUBLIC or PRIVATE, repo’s visibility.
Summary string
The repository general information. It can contain 1 to 80 characters.
Detail string
The repository specific information. MarkDown format is supported, and the length limit is 2000.
DomainList RepoDomainListArgs
The repository domain list.
Name string
Name of container registry repository.
Namespace string
Name of container registry namespace where repository is located.
RepoType string
PUBLIC or PRIVATE, repo’s visibility.
Summary string
The repository general information. It can contain 1 to 80 characters.
detail string
The repository specific information. MarkDown format is supported, and the length limit is 2000.
domainList RepoDomainListArgs
The repository domain list.
name string
Name of container registry repository.
namespace string
Name of container registry namespace where repository is located.
repoType string
PUBLIC or PRIVATE, repo’s visibility.
summary string
The repository general information. It can contain 1 to 80 characters.
detail str
The repository specific information. MarkDown format is supported, and the length limit is 2000.
domain_list RepoDomainListArgs
The repository domain list.
name str
Name of container registry repository.
namespace str
Name of container registry namespace where repository is located.
repo_type str
PUBLIC or PRIVATE, repo’s visibility.
summary str
The repository general information. It can contain 1 to 80 characters.

Supporting Types

RepoDomainList

Internal string
Domain of internal endpoint, only in some regions.
Public string
Domain of public endpoint.
Vpc string
Domain of vpc endpoint.
Internal string
Domain of internal endpoint, only in some regions.
Public string
Domain of public endpoint.
Vpc string
Domain of vpc endpoint.
internal string
Domain of internal endpoint, only in some regions.
public string
Domain of public endpoint.
vpc string
Domain of vpc endpoint.
internal str
Domain of internal endpoint, only in some regions.
public str
Domain of public endpoint.
vpc str
Domain of vpc endpoint.

Import

Container Registry repository can be imported using the namespace/repository, e.g.

 $ pulumi import alicloud:cr/repo:Repo default `my-namespace/my-repo`

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.