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.
artifactregistry¶
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-gcp repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-google repo.
- class
pulumi_gcp.artifactregistry.Repository(resource_name, opts=None, description=None, format=None, labels=None, location=None, project=None, repository_id=None, __props__=None, __name__=None, __opts__=None)¶ A repository for storing artifacts
To get more information about Repository, see:
How-to Guides
import pulumi import pulumi_gcp as gcp my_repo = gcp.artifactregistry.Repository("my-repo", location="us-central1", repository_id="my-repository", description="example docker repository", format="DOCKER")
import pulumi import pulumi_gcp as gcp my_repo = gcp.artifactregistry.Repository("my-repo", location="us-central1", repository_id="my-repository", description="example docker repository with iam", format="DOCKER") test_account = gcp.service_account.Account("test-account", account_id="my-account", display_name="Test Service Account") test_iam = gcp.artifactregistry.RepositoryIamMember("test-iam", location=my_repo.location, repository=my_repo.name, role="roles/artifactregistry.reader", member=test_account.email.apply(lambda email: f"serviceAccount:{email}"))
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – The user-provided description of the repository.
format (pulumi.Input[str]) – The format of packages that are stored in the repoitory.
labels (pulumi.Input[dict]) – 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.
location (pulumi.Input[str]) – The name of the location this repository is located in.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
repository_id (pulumi.Input[str]) – The last part of the repository name, for example: “repo1”
create_time: pulumi.Output[str] = None¶The time when the repository was created.
description: pulumi.Output[str] = None¶The user-provided description of the repository.
format: pulumi.Output[str] = None¶The format of packages that are stored in the repoitory.
labels: pulumi.Output[dict] = None¶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.
location: pulumi.Output[str] = None¶The name of the location this repository is located in.
name: pulumi.Output[str] = None¶The name of the repository, for example: “projects/p1/locations/us-central1/repositories/repo1”
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
repository_id: pulumi.Output[str] = None¶The last part of the repository name, for example: “repo1”
update_time: pulumi.Output[str] = None¶The time when the repository was last updated.
- static
get(resource_name, id, opts=None, create_time=None, description=None, format=None, labels=None, location=None, name=None, project=None, repository_id=None, update_time=None)¶ Get an existing Repository resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
create_time (pulumi.Input[str]) – The time when the repository was created.
description (pulumi.Input[str]) – The user-provided description of the repository.
format (pulumi.Input[str]) – The format of packages that are stored in the repoitory.
labels (pulumi.Input[dict]) – 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.
location (pulumi.Input[str]) – The name of the location this repository is located in.
name (pulumi.Input[str]) – The name of the repository, for example: “projects/p1/locations/us-central1/repositories/repo1”
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
repository_id (pulumi.Input[str]) – The last part of the repository name, for example: “repo1”
update_time (pulumi.Input[str]) – The time when the repository was last updated.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.artifactregistry.RepositoryIamBinding(resource_name, opts=None, condition=None, location=None, members=None, project=None, repository=None, role=None, __props__=None, __name__=None, __opts__=None)¶ Three different resources help you manage your IAM policy for Artifact Registry Repository. Each of these resources serves a different use case:
artifactregistry.RepositoryIamPolicy: Authoritative. Sets the IAM policy for the repository and replaces any existing policy already attached.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.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:
artifactregistry.RepositoryIamPolicycannot be used in conjunction withartifactregistry.RepositoryIamBindingandartifactregistry.RepositoryIamMemberor they will fight over what your policy should be.Note:
artifactregistry.RepositoryIamBindingresources can be used in conjunction withartifactregistry.RepositoryIamMemberresources only if they do not grant privilege to the same role.import pulumi import pulumi_gcp as gcp admin = gcp.organizations.get_iam_policy(binding=[{ "role": "roles/viewer", "members": ["user:jane@example.com"], }]) policy = 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"], policy_data=admin.policy_data)
import pulumi import pulumi_gcp as gcp binding = 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"])
import pulumi import pulumi_gcp as gcp member = 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")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
location (pulumi.Input[str]) – The name of the location this repository is located in. Used to find the parent resource to bind the IAM policy to
project (pulumi.Input[str]) – 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.
repository (pulumi.Input[str]) – Used to find the parent resource to bind the IAM policy to
role (pulumi.Input[str]) – The role that should be applied. Only one
artifactregistry.RepositoryIamBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.
The condition object supports the following:
description(pulumi.Input[str])expression(pulumi.Input[str])title(pulumi.Input[str])
etag: pulumi.Output[str] = None¶(Computed) The etag of the IAM policy.
location: pulumi.Output[str] = None¶The name of the location this repository is located in. Used to find the parent resource to bind the IAM policy to
project: pulumi.Output[str] = None¶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.
repository: pulumi.Output[str] = None¶Used to find the parent resource to bind the IAM policy to
role: pulumi.Output[str] = None¶The role that should be applied. Only one
artifactregistry.RepositoryIamBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.
- static
get(resource_name, id, opts=None, condition=None, etag=None, location=None, members=None, project=None, repository=None, role=None)¶ Get an existing RepositoryIamBinding resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
etag (pulumi.Input[str]) – (Computed) The etag of the IAM policy.
location (pulumi.Input[str]) – The name of the location this repository is located in. Used to find the parent resource to bind the IAM policy to
project (pulumi.Input[str]) – 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.
repository (pulumi.Input[str]) – Used to find the parent resource to bind the IAM policy to
role (pulumi.Input[str]) – The role that should be applied. Only one
artifactregistry.RepositoryIamBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.
The condition object supports the following:
description(pulumi.Input[str])expression(pulumi.Input[str])title(pulumi.Input[str])
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.artifactregistry.RepositoryIamMember(resource_name, opts=None, condition=None, location=None, member=None, project=None, repository=None, role=None, __props__=None, __name__=None, __opts__=None)¶ Three different resources help you manage your IAM policy for Artifact Registry Repository. Each of these resources serves a different use case:
artifactregistry.RepositoryIamPolicy: Authoritative. Sets the IAM policy for the repository and replaces any existing policy already attached.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.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:
artifactregistry.RepositoryIamPolicycannot be used in conjunction withartifactregistry.RepositoryIamBindingandartifactregistry.RepositoryIamMemberor they will fight over what your policy should be.Note:
artifactregistry.RepositoryIamBindingresources can be used in conjunction withartifactregistry.RepositoryIamMemberresources only if they do not grant privilege to the same role.import pulumi import pulumi_gcp as gcp admin = gcp.organizations.get_iam_policy(binding=[{ "role": "roles/viewer", "members": ["user:jane@example.com"], }]) policy = 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"], policy_data=admin.policy_data)
import pulumi import pulumi_gcp as gcp binding = 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"])
import pulumi import pulumi_gcp as gcp member = 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")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
location (pulumi.Input[str]) – The name of the location this repository is located in. Used to find the parent resource to bind the IAM policy to
project (pulumi.Input[str]) – 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.
repository (pulumi.Input[str]) – Used to find the parent resource to bind the IAM policy to
role (pulumi.Input[str]) – The role that should be applied. Only one
artifactregistry.RepositoryIamBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.
The condition object supports the following:
description(pulumi.Input[str])expression(pulumi.Input[str])title(pulumi.Input[str])
etag: pulumi.Output[str] = None¶(Computed) The etag of the IAM policy.
location: pulumi.Output[str] = None¶The name of the location this repository is located in. Used to find the parent resource to bind the IAM policy to
project: pulumi.Output[str] = None¶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.
repository: pulumi.Output[str] = None¶Used to find the parent resource to bind the IAM policy to
role: pulumi.Output[str] = None¶The role that should be applied. Only one
artifactregistry.RepositoryIamBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.
- static
get(resource_name, id, opts=None, condition=None, etag=None, location=None, member=None, project=None, repository=None, role=None)¶ Get an existing RepositoryIamMember resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
etag (pulumi.Input[str]) – (Computed) The etag of the IAM policy.
location (pulumi.Input[str]) – The name of the location this repository is located in. Used to find the parent resource to bind the IAM policy to
project (pulumi.Input[str]) – 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.
repository (pulumi.Input[str]) – Used to find the parent resource to bind the IAM policy to
role (pulumi.Input[str]) – The role that should be applied. Only one
artifactregistry.RepositoryIamBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.
The condition object supports the following:
description(pulumi.Input[str])expression(pulumi.Input[str])title(pulumi.Input[str])
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.artifactregistry.RepositoryIamPolicy(resource_name, opts=None, location=None, policy_data=None, project=None, repository=None, __props__=None, __name__=None, __opts__=None)¶ Three different resources help you manage your IAM policy for Artifact Registry Repository. Each of these resources serves a different use case:
artifactregistry.RepositoryIamPolicy: Authoritative. Sets the IAM policy for the repository and replaces any existing policy already attached.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.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:
artifactregistry.RepositoryIamPolicycannot be used in conjunction withartifactregistry.RepositoryIamBindingandartifactregistry.RepositoryIamMemberor they will fight over what your policy should be.Note:
artifactregistry.RepositoryIamBindingresources can be used in conjunction withartifactregistry.RepositoryIamMemberresources only if they do not grant privilege to the same role.import pulumi import pulumi_gcp as gcp admin = gcp.organizations.get_iam_policy(binding=[{ "role": "roles/viewer", "members": ["user:jane@example.com"], }]) policy = 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"], policy_data=admin.policy_data)
import pulumi import pulumi_gcp as gcp binding = 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"])
import pulumi import pulumi_gcp as gcp member = 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")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
location (pulumi.Input[str]) – The name of the location this repository is located in. Used to find the parent resource to bind the IAM policy to
policy_data (pulumi.Input[str]) – The policy data generated by a
organizations.getIAMPolicydata source.project (pulumi.Input[str]) – 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.
repository (pulumi.Input[str]) – Used to find the parent resource to bind the IAM policy to
etag: pulumi.Output[str] = None¶(Computed) The etag of the IAM policy.
location: pulumi.Output[str] = None¶The name of the location this repository is located in. Used to find the parent resource to bind the IAM policy to
policy_data: pulumi.Output[str] = None¶The policy data generated by a
organizations.getIAMPolicydata source.
project: pulumi.Output[str] = None¶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.
repository: pulumi.Output[str] = None¶Used to find the parent resource to bind the IAM policy to
- static
get(resource_name, id, opts=None, etag=None, location=None, policy_data=None, project=None, repository=None)¶ Get an existing RepositoryIamPolicy resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
etag (pulumi.Input[str]) – (Computed) The etag of the IAM policy.
location (pulumi.Input[str]) – The name of the location this repository is located in. Used to find the parent resource to bind the IAM policy to
policy_data (pulumi.Input[str]) – The policy data generated by a
organizations.getIAMPolicydata source.project (pulumi.Input[str]) – 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.
repository (pulumi.Input[str]) – Used to find the parent resource to bind the IAM policy to
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str