Show / Hide Table of Contents

Class Repository

A repository for storing artifacts

To get more information about Repository, see:

  • API documentation
  • How-to Guides
  • Official Documentation

Example Usage - Artifact Registry Repository Basic

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var my_repo = new Gcp.ArtifactRegistry.Repository("my-repo", new Gcp.ArtifactRegistry.RepositoryArgs
    {
        Location = "us-central1",
        RepositoryId = "my-repository",
        Description = "example docker repository",
        Format = "DOCKER",
    });
}

}

Example Usage - Artifact Registry Repository Iam

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var my_repo = new Gcp.ArtifactRegistry.Repository("my-repo", new Gcp.ArtifactRegistry.RepositoryArgs
    {
        Location = "us-central1",
        RepositoryId = "my-repository",
        Description = "example docker repository with iam",
        Format = "DOCKER",
    });
    var test_account = new Gcp.ServiceAccount.Account("test-account", new Gcp.ServiceAccount.AccountArgs
    {
        AccountId = "my-account",
        DisplayName = "Test Service Account",
    });
    var test_iam = new Gcp.ArtifactRegistry.RepositoryIamMember("test-iam", new Gcp.ArtifactRegistry.RepositoryIamMemberArgs
    {
        Location = my_repo.Location,
        Repository = my_repo.Name,
        Role = "roles/artifactregistry.reader",
        Member = test_account.Email.Apply(email => $"serviceAccount:{email}"),
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Repository
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Gcp.ArtifactRegistry
Assembly: Pulumi.Gcp.dll
Syntax
public class Repository : CustomResource

Constructors

View Source

Repository(String, RepositoryArgs, CustomResourceOptions)

Create a Repository resource with the given unique name, arguments, and options.

Declaration
public Repository(string name, RepositoryArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

RepositoryArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

CreateTime

The time when the repository was created.

Declaration
public Output<string> CreateTime { get; }
Property Value
Type Description
Output<System.String>
View Source

Description

The user-provided description of the repository.

Declaration
public Output<string> Description { get; }
Property Value
Type Description
Output<System.String>
View Source

Format

The format of packages that are stored in the repoitory.

Declaration
public Output<string> Format { get; }
Property Value
Type Description
Output<System.String>
View Source

Labels

Labels with user-defined metadata. This field may contain up to 64 entries. Label keys and values may be no longer than 63 characters. Label keys must begin with a lowercase letter and may only contain lowercase letters, numeric characters, underscores, and dashes.

Declaration
public Output<ImmutableDictionary<string, string>> Labels { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>>
View Source

Location

The name of the location this repository is located in.

Declaration
public Output<string> Location { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

The name of the repository, for example: "projects/p1/locations/us-central1/repositories/repo1"

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

Project

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Declaration
public Output<string> Project { get; }
Property Value
Type Description
Output<System.String>
View Source

RepositoryId

The last part of the repository name, for example: "repo1"

Declaration
public Output<string> RepositoryId { get; }
Property Value
Type Description
Output<System.String>
View Source

UpdateTime

The time when the repository was last updated.

Declaration
public Output<string> UpdateTime { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, RepositoryState, CustomResourceOptions)

Get an existing Repository resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static Repository Get(string name, Input<string> id, RepositoryState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

RepositoryState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Repository
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.