@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
1,020 lines • 40.5 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* A repository for storing artifacts
*
* To get more information about Repository, see:
*
* * [API documentation](https://cloud.google.com/artifact-registry/docs/reference/rest/v1/projects.locations.repositories)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/artifact-registry/docs/overview)
*
* ## Example Usage
*
* ### Artifact Registry Repository Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const my_repo = new gcp.artifactregistry.Repository("my-repo", {
* location: "us-central1",
* repositoryId: "my-repository",
* description: "example docker repository",
* format: "DOCKER",
* });
* ```
* ### Artifact Registry Repository Multi Region
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const my_repo = new gcp.artifactregistry.Repository("my-repo", {
* repositoryId: "my-repository",
* description: "example docker repository",
* location: "us",
* format: "DOCKER",
* });
* ```
* ### Artifact Registry Repository Docker
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const my_repo = new gcp.artifactregistry.Repository("my-repo", {
* location: "us-central1",
* repositoryId: "my-repository",
* description: "example docker repository",
* format: "DOCKER",
* dockerConfig: {
* immutableTags: true,
* },
* });
* ```
* ### Artifact Registry Repository Cmek
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const project = gcp.organizations.getProject({});
* const cryptoKey = new gcp.kms.CryptoKeyIAMMember("crypto_key", {
* cryptoKeyId: "kms-key",
* role: "roles/cloudkms.cryptoKeyEncrypterDecrypter",
* member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-artifactregistry.iam.gserviceaccount.com`),
* });
* const my_repo = new gcp.artifactregistry.Repository("my-repo", {
* location: "us-central1",
* repositoryId: "my-repository",
* description: "example docker repository with cmek",
* format: "DOCKER",
* kmsKeyName: "kms-key",
* }, {
* dependsOn: [cryptoKey],
* });
* ```
* ### Artifact Registry Repository Virtual
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const my_repo_upstream_1 = new gcp.artifactregistry.Repository("my-repo-upstream-1", {
* location: "us-central1",
* repositoryId: "my-repository-upstream-1",
* description: "example docker repository (upstream source) 1",
* format: "DOCKER",
* });
* const my_repo_upstream_2 = new gcp.artifactregistry.Repository("my-repo-upstream-2", {
* location: "us-central1",
* repositoryId: "my-repository-upstream-2",
* description: "example docker repository (upstream source) 2",
* format: "DOCKER",
* });
* const my_repo = new gcp.artifactregistry.Repository("my-repo", {
* location: "us-central1",
* repositoryId: "my-repository",
* description: "example virtual docker repository",
* format: "DOCKER",
* mode: "VIRTUAL_REPOSITORY",
* virtualRepositoryConfig: {
* upstreamPolicies: [
* {
* id: "my-repository-upstream-1",
* repository: my_repo_upstream_1.id,
* priority: 20,
* },
* {
* id: "my-repository-upstream-2",
* repository: my_repo_upstream_2.id,
* priority: 10,
* },
* ],
* },
* });
* ```
* ### Artifact Registry Repository Remote
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const my_repo = new gcp.artifactregistry.Repository("my-repo", {
* location: "us-central1",
* repositoryId: "my-repository",
* description: "example remote docker repository",
* format: "DOCKER",
* mode: "REMOTE_REPOSITORY",
* remoteRepositoryConfig: {
* description: "docker hub",
* dockerRepository: {
* publicRepository: "DOCKER_HUB",
* },
* },
* });
* ```
* ### Artifact Registry Repository Remote Apt
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const my_repo = new gcp.artifactregistry.Repository("my-repo", {
* location: "us-central1",
* repositoryId: "debian-stable",
* description: "example remote apt repository",
* format: "APT",
* mode: "REMOTE_REPOSITORY",
* remoteRepositoryConfig: {
* description: "Debian stable remote repository",
* aptRepository: {
* publicRepository: {
* repositoryBase: "DEBIAN",
* repositoryPath: "debian/dists/stable",
* },
* },
* },
* });
* ```
* ### Artifact Registry Repository Remote Yum
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const my_repo = new gcp.artifactregistry.Repository("my-repo", {
* location: "us-central1",
* repositoryId: "rocky-9",
* description: "example remote yum repository",
* format: "YUM",
* mode: "REMOTE_REPOSITORY",
* remoteRepositoryConfig: {
* description: "Rocky 9 remote repository",
* yumRepository: {
* publicRepository: {
* repositoryBase: "ROCKY",
* repositoryPath: "pub/rocky/9/BaseOS/x86_64/os",
* },
* },
* },
* });
* ```
* ### Artifact Registry Repository Cleanup
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const my_repo = new gcp.artifactregistry.Repository("my-repo", {
* location: "us-central1",
* repositoryId: "my-repository",
* description: "example docker repository with cleanup policies",
* format: "DOCKER",
* cleanupPolicyDryRun: false,
* cleanupPolicies: [
* {
* id: "delete-untagged",
* action: "DELETE",
* condition: {
* tagState: "UNTAGGED",
* },
* },
* {
* id: "keep-new-untagged",
* action: "KEEP",
* condition: {
* tagState: "UNTAGGED",
* newerThan: "7d",
* },
* },
* {
* id: "delete-prerelease",
* action: "DELETE",
* condition: {
* tagState: "TAGGED",
* tagPrefixes: [
* "alpha",
* "v0",
* ],
* olderThan: "30d",
* },
* },
* {
* id: "keep-tagged-release",
* action: "KEEP",
* condition: {
* tagState: "TAGGED",
* tagPrefixes: ["release"],
* packageNamePrefixes: [
* "webapp",
* "mobile",
* ],
* },
* },
* {
* id: "keep-minimum-versions",
* action: "KEEP",
* mostRecentVersions: {
* packageNamePrefixes: [
* "webapp",
* "mobile",
* "sandbox",
* ],
* keepCount: 5,
* },
* },
* ],
* });
* ```
* ### Artifact Registry Repository Remote Dockerhub Auth
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const project = gcp.organizations.getProject({});
* const example_remote_secret = new gcp.secretmanager.Secret("example-remote-secret", {
* secretId: "example-secret",
* replication: {
* auto: {},
* },
* });
* const example_remote_secretVersion = new gcp.secretmanager.SecretVersion("example-remote-secret_version", {
* secret: example_remote_secret.id,
* secretData: "remote-password",
* });
* const secret_access = new gcp.secretmanager.SecretIamMember("secret-access", {
* secretId: example_remote_secret.id,
* role: "roles/secretmanager.secretAccessor",
* member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-artifactregistry.iam.gserviceaccount.com`),
* });
* const my_repo = new gcp.artifactregistry.Repository("my-repo", {
* location: "us-central1",
* repositoryId: "example-dockerhub-remote",
* description: "example remote dockerhub repository with credentials",
* format: "DOCKER",
* mode: "REMOTE_REPOSITORY",
* remoteRepositoryConfig: {
* description: "docker hub with custom credentials",
* disableUpstreamValidation: true,
* dockerRepository: {
* publicRepository: "DOCKER_HUB",
* },
* upstreamCredentials: {
* usernamePasswordCredentials: {
* username: "remote-username",
* passwordSecretVersion: example_remote_secretVersion.name,
* },
* },
* },
* });
* ```
* ### Artifact Registry Repository Remote Docker Custom With Auth
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const project = gcp.organizations.getProject({});
* const example_remote_secret = new gcp.secretmanager.Secret("example-remote-secret", {
* secretId: "example-secret",
* replication: {
* auto: {},
* },
* });
* const example_remote_secretVersion = new gcp.secretmanager.SecretVersion("example-remote-secret_version", {
* secret: example_remote_secret.id,
* secretData: "remote-password",
* });
* const secret_access = new gcp.secretmanager.SecretIamMember("secret-access", {
* secretId: example_remote_secret.id,
* role: "roles/secretmanager.secretAccessor",
* member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-artifactregistry.iam.gserviceaccount.com`),
* });
* const my_repo = new gcp.artifactregistry.Repository("my-repo", {
* location: "us-central1",
* repositoryId: "example-docker-custom-remote",
* description: "example remote custom docker repository with credentials",
* format: "DOCKER",
* mode: "REMOTE_REPOSITORY",
* remoteRepositoryConfig: {
* description: "custom docker remote with credentials",
* disableUpstreamValidation: true,
* dockerRepository: {
* customRepository: {
* uri: "https://registry-1.docker.io",
* },
* },
* upstreamCredentials: {
* usernamePasswordCredentials: {
* username: "remote-username",
* passwordSecretVersion: example_remote_secretVersion.name,
* },
* },
* },
* });
* ```
* ### Artifact Registry Repository Remote Maven Custom With Auth
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const project = gcp.organizations.getProject({});
* const example_remote_secret = new gcp.secretmanager.Secret("example-remote-secret", {
* secretId: "example-secret",
* replication: {
* auto: {},
* },
* });
* const example_remote_secretVersion = new gcp.secretmanager.SecretVersion("example-remote-secret_version", {
* secret: example_remote_secret.id,
* secretData: "remote-password",
* });
* const secret_access = new gcp.secretmanager.SecretIamMember("secret-access", {
* secretId: example_remote_secret.id,
* role: "roles/secretmanager.secretAccessor",
* member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-artifactregistry.iam.gserviceaccount.com`),
* });
* const my_repo = new gcp.artifactregistry.Repository("my-repo", {
* location: "us-central1",
* repositoryId: "example-maven-custom-remote",
* description: "example remote custom maven repository with credentials",
* format: "MAVEN",
* mode: "REMOTE_REPOSITORY",
* remoteRepositoryConfig: {
* description: "custom maven remote with credentials",
* disableUpstreamValidation: true,
* mavenRepository: {
* customRepository: {
* uri: "https://my.maven.registry",
* },
* },
* upstreamCredentials: {
* usernamePasswordCredentials: {
* username: "remote-username",
* passwordSecretVersion: example_remote_secretVersion.name,
* },
* },
* },
* });
* ```
* ### Artifact Registry Repository Remote Npm Custom With Auth
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const project = gcp.organizations.getProject({});
* const example_remote_secret = new gcp.secretmanager.Secret("example-remote-secret", {
* secretId: "example-secret",
* replication: {
* auto: {},
* },
* });
* const example_remote_secretVersion = new gcp.secretmanager.SecretVersion("example-remote-secret_version", {
* secret: example_remote_secret.id,
* secretData: "remote-password",
* });
* const secret_access = new gcp.secretmanager.SecretIamMember("secret-access", {
* secretId: example_remote_secret.id,
* role: "roles/secretmanager.secretAccessor",
* member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-artifactregistry.iam.gserviceaccount.com`),
* });
* const my_repo = new gcp.artifactregistry.Repository("my-repo", {
* location: "us-central1",
* repositoryId: "example-npm-custom-remote",
* description: "example remote custom npm repository with credentials",
* format: "NPM",
* mode: "REMOTE_REPOSITORY",
* remoteRepositoryConfig: {
* description: "custom npm with credentials",
* disableUpstreamValidation: true,
* npmRepository: {
* customRepository: {
* uri: "https://my.npm.registry",
* },
* },
* upstreamCredentials: {
* usernamePasswordCredentials: {
* username: "remote-username",
* passwordSecretVersion: example_remote_secretVersion.name,
* },
* },
* },
* });
* ```
* ### Artifact Registry Repository Remote Python Custom With Auth
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const project = gcp.organizations.getProject({});
* const example_remote_secret = new gcp.secretmanager.Secret("example-remote-secret", {
* secretId: "example-secret",
* replication: {
* auto: {},
* },
* });
* const example_remote_secretVersion = new gcp.secretmanager.SecretVersion("example-remote-secret_version", {
* secret: example_remote_secret.id,
* secretData: "remote-password",
* });
* const secret_access = new gcp.secretmanager.SecretIamMember("secret-access", {
* secretId: example_remote_secret.id,
* role: "roles/secretmanager.secretAccessor",
* member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-artifactregistry.iam.gserviceaccount.com`),
* });
* const my_repo = new gcp.artifactregistry.Repository("my-repo", {
* location: "us-central1",
* repositoryId: "example-python-custom-remote",
* description: "example remote custom python repository with credentials",
* format: "PYTHON",
* mode: "REMOTE_REPOSITORY",
* remoteRepositoryConfig: {
* description: "custom npm with credentials",
* disableUpstreamValidation: true,
* pythonRepository: {
* customRepository: {
* uri: "https://my.python.registry",
* },
* },
* upstreamCredentials: {
* usernamePasswordCredentials: {
* username: "remote-username",
* passwordSecretVersion: example_remote_secretVersion.name,
* },
* },
* },
* });
* ```
* ### Artifact Registry Repository Remote Common Repository With Docker
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const upstreamRepo = new gcp.artifactregistry.Repository("upstream_repo", {
* location: "us-central1",
* repositoryId: "example-upstream-repo",
* description: "example upstream repository",
* format: "DOCKER",
* });
* const my_repo = new gcp.artifactregistry.Repository("my-repo", {
* location: "us-central1",
* repositoryId: "example-common-remote",
* description: "example remote common repository with docker upstream",
* format: "DOCKER",
* mode: "REMOTE_REPOSITORY",
* remoteRepositoryConfig: {
* description: "pull-through cache of another Artifact Registry repository",
* commonRepository: {
* uri: upstreamRepo.id,
* },
* },
* });
* ```
* ### Artifact Registry Repository Remote Common Repository With Artifact Registry Uri
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const project = gcp.organizations.getProject({});
* const upstreamRepo = new gcp.artifactregistry.Repository("upstream_repo", {
* location: "us-central1",
* repositoryId: "example-upstream-repo",
* description: "example upstream repository",
* format: "DOCKER",
* });
* const my_repo = new gcp.artifactregistry.Repository("my-repo", {
* location: "us-central1",
* repositoryId: "example-common-remote",
* description: "example remote common repository with docker upstream",
* format: "DOCKER",
* mode: "REMOTE_REPOSITORY",
* remoteRepositoryConfig: {
* description: "pull-through cache of another Artifact Registry repository by URL",
* commonRepository: {
* uri: project.then(project => `https://us-central1-docker.pkg.dev/${project.projectId}/example-upstream-repo`),
* },
* },
* }, {
* dependsOn: [upstreamRepo],
* });
* ```
* ### Artifact Registry Repository Remote Common Repository With Custom Upstream
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const project = gcp.organizations.getProject({});
* const example_remote_secret = new gcp.secretmanager.Secret("example-remote-secret", {
* secretId: "example-secret",
* replication: {
* auto: {},
* },
* });
* const example_remote_secretVersion = new gcp.secretmanager.SecretVersion("example-remote-secret_version", {
* secret: example_remote_secret.id,
* secretData: "remote-password",
* });
* const secret_access = new gcp.secretmanager.SecretIamMember("secret-access", {
* secretId: example_remote_secret.id,
* role: "roles/secretmanager.secretAccessor",
* member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-artifactregistry.iam.gserviceaccount.com`),
* });
* const my_repo = new gcp.artifactregistry.Repository("my-repo", {
* location: "us-central1",
* repositoryId: "example-docker-custom-remote",
* description: "example remote custom docker repository with credentials",
* format: "DOCKER",
* mode: "REMOTE_REPOSITORY",
* remoteRepositoryConfig: {
* description: "custom common docker remote with credentials",
* disableUpstreamValidation: true,
* commonRepository: {
* uri: "https://registry-1.docker.io",
* },
* upstreamCredentials: {
* usernamePasswordCredentials: {
* username: "remote-username",
* passwordSecretVersion: example_remote_secretVersion.name,
* },
* },
* },
* });
* ```
* ### Artifact Registry Repository Vulnerability Scanning
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const my_repo = new gcp.artifactregistry.Repository("my-repo", {
* location: "us-central1",
* repositoryId: "my-repository",
* description: "example docker repository with vulnerability scanning config",
* format: "DOCKER",
* vulnerabilityScanningConfig: {
* enablementConfig: "INHERITED",
* },
* });
* ```
*
* ## Regional Endpoint Policies
*
* This resource supports Regional Endpoint Policies (REP). See the provider reference for more details on configuration.
*
* ## Import
*
* Repository can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{location}}/repositories/{{repository_id}}`
* * `{{project}}/{{location}}/{{repository_id}}`
* * `{{location}}/{{repository_id}}`
*
* When using the `pulumi import` command, Repository can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:artifactregistry/repository:Repository default projects/{{project}}/locations/{{location}}/repositories/{{repository_id}}
* $ pulumi import gcp:artifactregistry/repository:Repository default {{project}}/{{location}}/{{repository_id}}
* $ pulumi import gcp:artifactregistry/repository:Repository default {{location}}/{{repository_id}}
* ```
*/
export declare class Repository extends pulumi.CustomResource {
/**
* Get an existing Repository resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RepositoryState, opts?: pulumi.CustomResourceOptions): 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.
*/
static isInstance(obj: any): obj is Repository;
/**
* Cleanup policies for this repository. Cleanup policies indicate when
* certain package versions can be automatically deleted.
* Map keys are policy IDs supplied by users during policy creation. They must
* unique within a repository and be under 128 characters in length.
* Structure is documented below.
*/
readonly cleanupPolicies: pulumi.Output<outputs.artifactregistry.RepositoryCleanupPolicy[] | undefined>;
/**
* If true, the cleanup pipeline is prevented from deleting versions in this
* repository.
*/
readonly cleanupPolicyDryRun: pulumi.Output<boolean | undefined>;
/**
* The time when the repository was created.
*/
readonly createTime: pulumi.Output<string>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
readonly deletionPolicy: pulumi.Output<string>;
/**
* The user-provided description of the repository.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Docker repository config contains repository level configuration for the repositories of docker type.
* Structure is documented below.
*/
readonly dockerConfig: pulumi.Output<outputs.artifactregistry.RepositoryDockerConfig | undefined>;
/**
* All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
*/
readonly effectiveLabels: pulumi.Output<{
[key: string]: string;
}>;
/**
* The format of packages that are stored in the repository. Supported formats
* can be found [here](https://cloud.google.com/artifact-registry/docs/supported-formats).
* You can only create alpha formats if you are a member of the
* [alpha user group](https://cloud.google.com/artifact-registry/docs/supported-formats#alpha-access).
*/
readonly format: pulumi.Output<string>;
/**
* The Cloud KMS resource name of the customer managed encryption key that’s
* used to encrypt the contents of the Repository. Has the form:
* `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
* This value may not be changed after the Repository has been created.
*/
readonly kmsKeyName: pulumi.Output<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.
*
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field `effectiveLabels` for all of the labels present on the resource.
*/
readonly labels: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* The name of the repository's location. In addition to specific regions,
* special values for multi-region locations are `asia`, `europe`, and `us`.
* See [here](https://cloud.google.com/artifact-registry/docs/repositories/repo-locations),
* or use the
* gcp.artifactregistry.getLocations
* data source for possible values.
*/
readonly location: pulumi.Output<string>;
/**
* MavenRepositoryConfig is maven related repository details.
* Provides additional configuration details for repositories of the maven
* format type.
* Structure is documented below.
*/
readonly mavenConfig: pulumi.Output<outputs.artifactregistry.RepositoryMavenConfig | undefined>;
/**
* The mode configures the repository to serve artifacts from different sources.
* Default value is `STANDARD_REPOSITORY`.
* Possible values are: `STANDARD_REPOSITORY`, `VIRTUAL_REPOSITORY`, `REMOTE_REPOSITORY`.
*/
readonly mode: pulumi.Output<string | undefined>;
/**
* The name of the repository, for example:
* "repo1"
*/
readonly name: pulumi.Output<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
readonly project: pulumi.Output<string>;
/**
* The combination of labels configured directly on the resource
* and default labels configured on the provider.
*/
readonly pulumiLabels: pulumi.Output<{
[key: string]: string;
}>;
/**
* The repository endpoint, for example: us-docker.pkg.dev/my-proj/my-repo.
*/
readonly registryUri: pulumi.Output<string>;
/**
* Configuration specific for a Remote Repository.
* Structure is documented below.
*/
readonly remoteRepositoryConfig: pulumi.Output<outputs.artifactregistry.RepositoryRemoteRepositoryConfig | undefined>;
/**
* The last part of the repository name, for example:
* "repo1"
*/
readonly repositoryId: pulumi.Output<string>;
/**
* The time when the repository was last updated.
*/
readonly updateTime: pulumi.Output<string>;
/**
* Configuration specific for a Virtual Repository.
* Structure is documented below.
*/
readonly virtualRepositoryConfig: pulumi.Output<outputs.artifactregistry.RepositoryVirtualRepositoryConfig | undefined>;
/**
* Configuration for vulnerability scanning of artifacts stored in this repository.
* Structure is documented below.
*/
readonly vulnerabilityScanningConfig: pulumi.Output<outputs.artifactregistry.RepositoryVulnerabilityScanningConfig>;
/**
* Create a Repository resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: RepositoryArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Repository resources.
*/
export interface RepositoryState {
/**
* Cleanup policies for this repository. Cleanup policies indicate when
* certain package versions can be automatically deleted.
* Map keys are policy IDs supplied by users during policy creation. They must
* unique within a repository and be under 128 characters in length.
* Structure is documented below.
*/
cleanupPolicies?: pulumi.Input<pulumi.Input<inputs.artifactregistry.RepositoryCleanupPolicy>[] | undefined>;
/**
* If true, the cleanup pipeline is prevented from deleting versions in this
* repository.
*/
cleanupPolicyDryRun?: pulumi.Input<boolean | undefined>;
/**
* The time when the repository was created.
*/
createTime?: pulumi.Input<string | undefined>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
deletionPolicy?: pulumi.Input<string | undefined>;
/**
* The user-provided description of the repository.
*/
description?: pulumi.Input<string | undefined>;
/**
* Docker repository config contains repository level configuration for the repositories of docker type.
* Structure is documented below.
*/
dockerConfig?: pulumi.Input<inputs.artifactregistry.RepositoryDockerConfig | undefined>;
/**
* All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
*/
effectiveLabels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
} | undefined>;
/**
* The format of packages that are stored in the repository. Supported formats
* can be found [here](https://cloud.google.com/artifact-registry/docs/supported-formats).
* You can only create alpha formats if you are a member of the
* [alpha user group](https://cloud.google.com/artifact-registry/docs/supported-formats#alpha-access).
*/
format?: pulumi.Input<string | undefined>;
/**
* The Cloud KMS resource name of the customer managed encryption key that’s
* used to encrypt the contents of the Repository. Has the form:
* `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
* This value may not be changed after the Repository has been created.
*/
kmsKeyName?: pulumi.Input<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.
*
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field `effectiveLabels` for all of the labels present on the resource.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
} | undefined>;
/**
* The name of the repository's location. In addition to specific regions,
* special values for multi-region locations are `asia`, `europe`, and `us`.
* See [here](https://cloud.google.com/artifact-registry/docs/repositories/repo-locations),
* or use the
* gcp.artifactregistry.getLocations
* data source for possible values.
*/
location?: pulumi.Input<string | undefined>;
/**
* MavenRepositoryConfig is maven related repository details.
* Provides additional configuration details for repositories of the maven
* format type.
* Structure is documented below.
*/
mavenConfig?: pulumi.Input<inputs.artifactregistry.RepositoryMavenConfig | undefined>;
/**
* The mode configures the repository to serve artifacts from different sources.
* Default value is `STANDARD_REPOSITORY`.
* Possible values are: `STANDARD_REPOSITORY`, `VIRTUAL_REPOSITORY`, `REMOTE_REPOSITORY`.
*/
mode?: pulumi.Input<string | undefined>;
/**
* The name of the repository, for example:
* "repo1"
*/
name?: pulumi.Input<string | undefined>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string | undefined>;
/**
* The combination of labels configured directly on the resource
* and default labels configured on the provider.
*/
pulumiLabels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
} | undefined>;
/**
* The repository endpoint, for example: us-docker.pkg.dev/my-proj/my-repo.
*/
registryUri?: pulumi.Input<string | undefined>;
/**
* Configuration specific for a Remote Repository.
* Structure is documented below.
*/
remoteRepositoryConfig?: pulumi.Input<inputs.artifactregistry.RepositoryRemoteRepositoryConfig | undefined>;
/**
* The last part of the repository name, for example:
* "repo1"
*/
repositoryId?: pulumi.Input<string | undefined>;
/**
* The time when the repository was last updated.
*/
updateTime?: pulumi.Input<string | undefined>;
/**
* Configuration specific for a Virtual Repository.
* Structure is documented below.
*/
virtualRepositoryConfig?: pulumi.Input<inputs.artifactregistry.RepositoryVirtualRepositoryConfig | undefined>;
/**
* Configuration for vulnerability scanning of artifacts stored in this repository.
* Structure is documented below.
*/
vulnerabilityScanningConfig?: pulumi.Input<inputs.artifactregistry.RepositoryVulnerabilityScanningConfig | undefined>;
}
/**
* The set of arguments for constructing a Repository resource.
*/
export interface RepositoryArgs {
/**
* Cleanup policies for this repository. Cleanup policies indicate when
* certain package versions can be automatically deleted.
* Map keys are policy IDs supplied by users during policy creation. They must
* unique within a repository and be under 128 characters in length.
* Structure is documented below.
*/
cleanupPolicies?: pulumi.Input<pulumi.Input<inputs.artifactregistry.RepositoryCleanupPolicy>[] | undefined>;
/**
* If true, the cleanup pipeline is prevented from deleting versions in this
* repository.
*/
cleanupPolicyDryRun?: pulumi.Input<boolean | undefined>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
deletionPolicy?: pulumi.Input<string | undefined>;
/**
* The user-provided description of the repository.
*/
description?: pulumi.Input<string | undefined>;
/**
* Docker repository config contains repository level configuration for the repositories of docker type.
* Structure is documented below.
*/
dockerConfig?: pulumi.Input<inputs.artifactregistry.RepositoryDockerConfig | undefined>;
/**
* The format of packages that are stored in the repository. Supported formats
* can be found [here](https://cloud.google.com/artifact-registry/docs/supported-formats).
* You can only create alpha formats if you are a member of the
* [alpha user group](https://cloud.google.com/artifact-registry/docs/supported-formats#alpha-access).
*/
format: pulumi.Input<string>;
/**
* The Cloud KMS resource name of the customer managed encryption key that’s
* used to encrypt the contents of the Repository. Has the form:
* `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
* This value may not be changed after the Repository has been created.
*/
kmsKeyName?: pulumi.Input<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.
*
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field `effectiveLabels` for all of the labels present on the resource.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
} | undefined>;
/**
* The name of the repository's location. In addition to specific regions,
* special values for multi-region locations are `asia`, `europe`, and `us`.
* See [here](https://cloud.google.com/artifact-registry/docs/repositories/repo-locations),
* or use the
* gcp.artifactregistry.getLocations
* data source for possible values.
*/
location?: pulumi.Input<string | undefined>;
/**
* MavenRepositoryConfig is maven related repository details.
* Provides additional configuration details for repositories of the maven
* format type.
* Structure is documented below.
*/
mavenConfig?: pulumi.Input<inputs.artifactregistry.RepositoryMavenConfig | undefined>;
/**
* The mode configures the repository to serve artifacts from different sources.
* Default value is `STANDARD_REPOSITORY`.
* Possible values are: `STANDARD_REPOSITORY`, `VIRTUAL_REPOSITORY`, `REMOTE_REPOSITORY`.
*/
mode?: pulumi.Input<string | undefined>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string | undefined>;
/**
* Configuration specific for a Remote Repository.
* Structure is documented below.
*/
remoteRepositoryConfig?: pulumi.Input<inputs.artifactregistry.RepositoryRemoteRepositoryConfig | undefined>;
/**
* The last part of the repository name, for example:
* "repo1"
*/
repositoryId: pulumi.Input<string>;
/**
* Configuration specific for a Virtual Repository.
* Structure is documented below.
*/
virtualRepositoryConfig?: pulumi.Input<inputs.artifactregistry.RepositoryVirtualRepositoryConfig | undefined>;
/**
* Configuration for vulnerability scanning of artifacts stored in this repository.
* Structure is documented below.
*/
vulnerabilityScanningConfig?: pulumi.Input<inputs.artifactregistry.RepositoryVulnerabilityScanningConfig | undefined>;
}
//# sourceMappingURL=repository.d.ts.map