Module artifactregistry

This page documents the language specification for the gcp package. If you're looking for help working with the inputs, outputs, or functions of gcp resources in a Pulumi program, please see the resource documentation for examples and API reference.

Resources

Others

Resources

Resource Repository

class Repository extends CustomResource

A repository for storing artifacts

To get more information about Repository, see:

Example Usage - Artifact Registry Repository Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const myRepo = new gcp.artifactregistry.Repository("my-repo", {
    location: "us-central1",
    repositoryId: "my-repository",
    description: "example docker repository",
    format: "DOCKER",
});

Example Usage - Artifact Registry Repository Iam

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const myRepo = new gcp.artifactregistry.Repository("my-repo", {
    location: "us-central1",
    repositoryId: "my-repository",
    description: "example docker repository with iam",
    format: "DOCKER",
});
const testAccount = new gcp.serviceAccount.Account("test-account", {
    accountId: "my-account",
    displayName: "Test Service Account",
});
const testIam = new gcp.artifactregistry.RepositoryIamMember("test-iam", {
    location: my_repo.location,
    repository: my_repo.name,
    role: "roles/artifactregistry.reader",
    member: pulumi.interpolate`serviceAccount:${test_account.email}`,
});

constructor

new Repository(name: string, args: RepositoryArgs, opts?: pulumi.CustomResourceOptions)

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

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RepositoryState, opts?: pulumi.CustomResourceOptions): Repository

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Repository

Returns true if the given object is an instance of Repository. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property createTime

public createTime: pulumi.Output<string>;

The time when the repository was created.

property description

public description: pulumi.Output<string | undefined>;

The user-provided description of the repository.

property format

public format: pulumi.Output<string>;

The format of packages that are stored in the repoitory.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property labels

public labels: pulumi.Output<{[key: string]: string} | undefined>;

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.

property location

public location: pulumi.Output<string>;

The name of the location this repository is located in.

property name

public name: pulumi.Output<string>;

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

property project

public project: pulumi.Output<string>;

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

property repositoryId

public repositoryId: pulumi.Output<string>;

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

property updateTime

public updateTime: pulumi.Output<string>;

The time when the repository was last updated.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource RepositoryIamBinding

class RepositoryIamBinding extends CustomResource

Three different resources help you manage your IAM policy for Artifact Registry Repository. Each of these resources serves a different use case:

  • gcp.artifactregistry.RepositoryIamPolicy: Authoritative. Sets the IAM policy for the repository and replaces any existing policy already attached.
  • gcp.artifactregistry.RepositoryIamBinding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the repository are preserved.
  • gcp.artifactregistry.RepositoryIamMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the repository are preserved.

Note: gcp.artifactregistry.RepositoryIamPolicy cannot be used in conjunction with gcp.artifactregistry.RepositoryIamBinding and gcp.artifactregistry.RepositoryIamMember or they will fight over what your policy should be.

Note: gcp.artifactregistry.RepositoryIamBinding resources can be used in conjunction with gcp.artifactregistry.RepositoryIamMember resources only if they do not grant privilege to the same role.

google_artifact_registry_repository_iam_policy

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const admin = gcp.organizations.getIAMPolicy({
    binding: [{
        role: "roles/viewer",
        members: ["user:jane@example.com"],
    }],
});
const policy = new gcp.artifactregistry.RepositoryIamPolicy("policy", {
    project: google_artifact_registry_repository["my-repo"].project,
    location: google_artifact_registry_repository["my-repo"].location,
    repository: google_artifact_registry_repository["my-repo"].name,
    policyData: admin.then(admin => admin.policyData),
});

google_artifact_registry_repository_iam_binding

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const binding = new gcp.artifactregistry.RepositoryIamBinding("binding", {
    project: google_artifact_registry_repository["my-repo"].project,
    location: google_artifact_registry_repository["my-repo"].location,
    repository: google_artifact_registry_repository["my-repo"].name,
    role: "roles/viewer",
    members: ["user:jane@example.com"],
});

google_artifact_registry_repository_iam_member

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const member = new gcp.artifactregistry.RepositoryIamMember("member", {
    project: google_artifact_registry_repository["my-repo"].project,
    location: google_artifact_registry_repository["my-repo"].location,
    repository: google_artifact_registry_repository["my-repo"].name,
    role: "roles/viewer",
    member: "user:jane@example.com",
});

constructor

new RepositoryIamBinding(name: string, args: RepositoryIamBindingArgs, opts?: pulumi.CustomResourceOptions)

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

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RepositoryIamBindingState, opts?: pulumi.CustomResourceOptions): RepositoryIamBinding

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is RepositoryIamBinding

Returns true if the given object is an instance of RepositoryIamBinding. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property condition

public condition: pulumi.Output<RepositoryIamBindingCondition | undefined>;

property etag

public etag: pulumi.Output<string>;

(Computed) The etag of the IAM policy.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property location

public location: pulumi.Output<string>;

The name of the location this repository is located in. Used to find the parent resource to bind the IAM policy to

property members

public members: pulumi.Output<string[]>;

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.

property repository

public repository: pulumi.Output<string>;

Used to find the parent resource to bind the IAM policy to

property role

public role: pulumi.Output<string>;

The role that should be applied. Only one gcp.artifactregistry.RepositoryIamBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource RepositoryIamMember

class RepositoryIamMember extends CustomResource

Three different resources help you manage your IAM policy for Artifact Registry Repository. Each of these resources serves a different use case:

  • gcp.artifactregistry.RepositoryIamPolicy: Authoritative. Sets the IAM policy for the repository and replaces any existing policy already attached.
  • gcp.artifactregistry.RepositoryIamBinding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the repository are preserved.
  • gcp.artifactregistry.RepositoryIamMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the repository are preserved.

Note: gcp.artifactregistry.RepositoryIamPolicy cannot be used in conjunction with gcp.artifactregistry.RepositoryIamBinding and gcp.artifactregistry.RepositoryIamMember or they will fight over what your policy should be.

Note: gcp.artifactregistry.RepositoryIamBinding resources can be used in conjunction with gcp.artifactregistry.RepositoryIamMember resources only if they do not grant privilege to the same role.

google_artifact_registry_repository_iam_policy

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const admin = gcp.organizations.getIAMPolicy({
    binding: [{
        role: "roles/viewer",
        members: ["user:jane@example.com"],
    }],
});
const policy = new gcp.artifactregistry.RepositoryIamPolicy("policy", {
    project: google_artifact_registry_repository["my-repo"].project,
    location: google_artifact_registry_repository["my-repo"].location,
    repository: google_artifact_registry_repository["my-repo"].name,
    policyData: admin.then(admin => admin.policyData),
});

google_artifact_registry_repository_iam_binding

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const binding = new gcp.artifactregistry.RepositoryIamBinding("binding", {
    project: google_artifact_registry_repository["my-repo"].project,
    location: google_artifact_registry_repository["my-repo"].location,
    repository: google_artifact_registry_repository["my-repo"].name,
    role: "roles/viewer",
    members: ["user:jane@example.com"],
});

google_artifact_registry_repository_iam_member

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const member = new gcp.artifactregistry.RepositoryIamMember("member", {
    project: google_artifact_registry_repository["my-repo"].project,
    location: google_artifact_registry_repository["my-repo"].location,
    repository: google_artifact_registry_repository["my-repo"].name,
    role: "roles/viewer",
    member: "user:jane@example.com",
});

constructor

new RepositoryIamMember(name: string, args: RepositoryIamMemberArgs, opts?: pulumi.CustomResourceOptions)

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

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RepositoryIamMemberState, opts?: pulumi.CustomResourceOptions): RepositoryIamMember

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is RepositoryIamMember

Returns true if the given object is an instance of RepositoryIamMember. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property condition

public condition: pulumi.Output<RepositoryIamMemberCondition | undefined>;

property etag

public etag: pulumi.Output<string>;

(Computed) The etag of the IAM policy.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property location

public location: pulumi.Output<string>;

The name of the location this repository is located in. Used to find the parent resource to bind the IAM policy to

property member

public member: pulumi.Output<string>;

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.

property repository

public repository: pulumi.Output<string>;

Used to find the parent resource to bind the IAM policy to

property role

public role: pulumi.Output<string>;

The role that should be applied. Only one gcp.artifactregistry.RepositoryIamBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource RepositoryIamPolicy

class RepositoryIamPolicy extends CustomResource

Three different resources help you manage your IAM policy for Artifact Registry Repository. Each of these resources serves a different use case:

  • gcp.artifactregistry.RepositoryIamPolicy: Authoritative. Sets the IAM policy for the repository and replaces any existing policy already attached.
  • gcp.artifactregistry.RepositoryIamBinding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the repository are preserved.
  • gcp.artifactregistry.RepositoryIamMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the repository are preserved.

Note: gcp.artifactregistry.RepositoryIamPolicy cannot be used in conjunction with gcp.artifactregistry.RepositoryIamBinding and gcp.artifactregistry.RepositoryIamMember or they will fight over what your policy should be.

Note: gcp.artifactregistry.RepositoryIamBinding resources can be used in conjunction with gcp.artifactregistry.RepositoryIamMember resources only if they do not grant privilege to the same role.

google_artifact_registry_repository_iam_policy

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const admin = gcp.organizations.getIAMPolicy({
    binding: [{
        role: "roles/viewer",
        members: ["user:jane@example.com"],
    }],
});
const policy = new gcp.artifactregistry.RepositoryIamPolicy("policy", {
    project: google_artifact_registry_repository["my-repo"].project,
    location: google_artifact_registry_repository["my-repo"].location,
    repository: google_artifact_registry_repository["my-repo"].name,
    policyData: admin.then(admin => admin.policyData),
});

google_artifact_registry_repository_iam_binding

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const binding = new gcp.artifactregistry.RepositoryIamBinding("binding", {
    project: google_artifact_registry_repository["my-repo"].project,
    location: google_artifact_registry_repository["my-repo"].location,
    repository: google_artifact_registry_repository["my-repo"].name,
    role: "roles/viewer",
    members: ["user:jane@example.com"],
});

google_artifact_registry_repository_iam_member

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const member = new gcp.artifactregistry.RepositoryIamMember("member", {
    project: google_artifact_registry_repository["my-repo"].project,
    location: google_artifact_registry_repository["my-repo"].location,
    repository: google_artifact_registry_repository["my-repo"].name,
    role: "roles/viewer",
    member: "user:jane@example.com",
});

constructor

new RepositoryIamPolicy(name: string, args: RepositoryIamPolicyArgs, opts?: pulumi.CustomResourceOptions)

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

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RepositoryIamPolicyState, opts?: pulumi.CustomResourceOptions): RepositoryIamPolicy

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is RepositoryIamPolicy

Returns true if the given object is an instance of RepositoryIamPolicy. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property etag

public etag: pulumi.Output<string>;

(Computed) The etag of the IAM policy.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property location

public location: pulumi.Output<string>;

The name of the location this repository is located in. Used to find the parent resource to bind the IAM policy to

property policyData

public policyData: pulumi.Output<string>;

The policy data generated by a gcp.organizations.getIAMPolicy data source.

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.

property repository

public repository: pulumi.Output<string>;

Used to find the parent resource to bind the IAM policy to

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Others

interface RepositoryArgs

interface RepositoryArgs

The set of arguments for constructing a Repository resource.

property description

description?: pulumi.Input<string>;

The user-provided description of the repository.

property format

format: pulumi.Input<string>;

The format of packages that are stored in the repoitory.

property labels

labels?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;

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.

property location

location?: pulumi.Input<string>;

The name of the location this repository is located in.

property project

project?: pulumi.Input<string>;

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

property repositoryId

repositoryId: pulumi.Input<string>;

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

interface RepositoryIamBindingArgs

interface RepositoryIamBindingArgs

The set of arguments for constructing a RepositoryIamBinding resource.

property condition

condition?: pulumi.Input<RepositoryIamBindingCondition>;

property location

location?: pulumi.Input<string>;

The name of the location this repository is located in. Used to find the parent resource to bind the IAM policy to

property members

members: pulumi.Input<pulumi.Input<string>[]>;

property project

project?: pulumi.Input<string>;

The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.

property repository

repository: pulumi.Input<string>;

Used to find the parent resource to bind the IAM policy to

property role

role: pulumi.Input<string>;

The role that should be applied. Only one gcp.artifactregistry.RepositoryIamBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

interface RepositoryIamBindingState

interface RepositoryIamBindingState

Input properties used for looking up and filtering RepositoryIamBinding resources.

property condition

condition?: pulumi.Input<RepositoryIamBindingCondition>;

property etag

etag?: pulumi.Input<string>;

(Computed) The etag of the IAM policy.

property location

location?: pulumi.Input<string>;

The name of the location this repository is located in. Used to find the parent resource to bind the IAM policy to

property members

members?: pulumi.Input<pulumi.Input<string>[]>;

property project

project?: pulumi.Input<string>;

The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.

property repository

repository?: pulumi.Input<string>;

Used to find the parent resource to bind the IAM policy to

property role

role?: pulumi.Input<string>;

The role that should be applied. Only one gcp.artifactregistry.RepositoryIamBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

interface RepositoryIamMemberArgs

interface RepositoryIamMemberArgs

The set of arguments for constructing a RepositoryIamMember resource.

property condition

condition?: pulumi.Input<RepositoryIamMemberCondition>;

property location

location?: pulumi.Input<string>;

The name of the location this repository is located in. Used to find the parent resource to bind the IAM policy to

property member

member: pulumi.Input<string>;

property project

project?: pulumi.Input<string>;

The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.

property repository

repository: pulumi.Input<string>;

Used to find the parent resource to bind the IAM policy to

property role

role: pulumi.Input<string>;

The role that should be applied. Only one gcp.artifactregistry.RepositoryIamBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

interface RepositoryIamMemberState

interface RepositoryIamMemberState

Input properties used for looking up and filtering RepositoryIamMember resources.

property condition

condition?: pulumi.Input<RepositoryIamMemberCondition>;

property etag

etag?: pulumi.Input<string>;

(Computed) The etag of the IAM policy.

property location

location?: pulumi.Input<string>;

The name of the location this repository is located in. Used to find the parent resource to bind the IAM policy to

property member

member?: pulumi.Input<string>;

property project

project?: pulumi.Input<string>;

The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.

property repository

repository?: pulumi.Input<string>;

Used to find the parent resource to bind the IAM policy to

property role

role?: pulumi.Input<string>;

The role that should be applied. Only one gcp.artifactregistry.RepositoryIamBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

interface RepositoryIamPolicyArgs

interface RepositoryIamPolicyArgs

The set of arguments for constructing a RepositoryIamPolicy resource.

property location

location?: pulumi.Input<string>;

The name of the location this repository is located in. Used to find the parent resource to bind the IAM policy to

property policyData

policyData: pulumi.Input<string>;

The policy data generated by a gcp.organizations.getIAMPolicy data source.

property project

project?: pulumi.Input<string>;

The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.

property repository

repository: pulumi.Input<string>;

Used to find the parent resource to bind the IAM policy to

interface RepositoryIamPolicyState

interface RepositoryIamPolicyState

Input properties used for looking up and filtering RepositoryIamPolicy resources.

property etag

etag?: pulumi.Input<string>;

(Computed) The etag of the IAM policy.

property location

location?: pulumi.Input<string>;

The name of the location this repository is located in. Used to find the parent resource to bind the IAM policy to

property policyData

policyData?: pulumi.Input<string>;

The policy data generated by a gcp.organizations.getIAMPolicy data source.

property project

project?: pulumi.Input<string>;

The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.

property repository

repository?: pulumi.Input<string>;

Used to find the parent resource to bind the IAM policy to

interface RepositoryState

interface RepositoryState

Input properties used for looking up and filtering Repository resources.

property createTime

createTime?: pulumi.Input<string>;

The time when the repository was created.

property description

description?: pulumi.Input<string>;

The user-provided description of the repository.

property format

format?: pulumi.Input<string>;

The format of packages that are stored in the repoitory.

property labels

labels?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;

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.

property location

location?: pulumi.Input<string>;

The name of the location this repository is located in.

property name

name?: pulumi.Input<string>;

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

property project

project?: pulumi.Input<string>;

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

property repositoryId

repositoryId?: pulumi.Input<string>;

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

property updateTime

updateTime?: pulumi.Input<string>;

The time when the repository was last updated.