# ArtifactRegistryRepository

| **Property** | **Value** |
|---|---|
| Google Cloud Service Name | ArtifactRegistry |
| Google Cloud Service Documentation | [/artifact-registry/docs/](https://docs.cloud.google.com/artifact-registry/docs.md.txt) |
| Google Cloud REST Resource Name | v1beta1.projects.locations.repositories |
| Google Cloud REST Resource Documentation | [/artifact-registry/docs/reference/rest/v1beta1/projects.locations.repositories](https://docs.cloud.google.com/artifact-registry/docs/reference/rest/v1beta2/projects.locations.repositories) |
| Config Connector Resource Short Names | artifactregistryrepository gcpartifactregistryrepositories gcpartifactregistryrepository |
| Config Connector Service Name | artifactregistry.googleapis.com |
| Config Connector Resource Fully Qualified Name | artifactregistryrepositories.artifactregistry.cnrm.cloud.google.com |
| Can Be Referenced by IAMPolicy/IAMPolicyMember | Yes |
| Supports IAM Conditions | No |
| Supports IAM Audit Configs | No |
| IAM External Reference Format | projects/{{project}}/locations/{{location}}/repositories/{{repository_id}} |
| Config Connector Default Average Reconcile Interval In Seconds | 600 |

## Custom Resource Definition Properties

### Annotations

| Fields ||
|---|---|
| `cnrm.cloud.google.com/project-id` |

### Spec

#### Schema

```yaml
cleanupPolicies:
- action: string
  condition:
    newerThan: string
    olderThan: string
    packageNamePrefixes:
    - string
    tagPrefixes:
    - string
    tagState: string
    versionNamePrefixes:
    - string
  id: string
  mostRecentVersions:
    keepCount: integer
    packageNamePrefixes:
    - string
cleanupPolicyDryRun: boolean
description: string
dockerConfig:
  immutableTags: boolean
format: string
kmsKeyRef:
  external: string
  name: string
  namespace: string
location: string
mavenConfig:
  allowSnapshotOverwrites: boolean
  versionPolicy: string
mode: string
remoteRepositoryConfig:
  commonRepository:
    uri: string
  description: string
  dockerRepository:
    publicRepository: string
  mavenRepository:
    publicRepository: string
  npmRepository:
    publicRepository: string
  pythonRepository:
    publicRepository: string
resourceID: string
virtualRepositoryConfig:
  upstreamPolicies:
  - id: string
    priority: integer
    repositoryRef:
      external: string
      name: string
      namespace: string
```

| Fields ||
|---|---|
| `cleanupPolicies` *Optional* | `list (object)` 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. |
| `cleanupPolicies[]` *Optional* | `object` <br /> |
| `cleanupPolicies[].action` *Optional* | `string` Policy action. |
| `cleanupPolicies[].condition` *Optional* | `object` Policy condition for matching versions. |
| `cleanupPolicies[].condition.newerThan` *Optional* | `string` Match versions newer than a duration. |
| `cleanupPolicies[].condition.olderThan` *Optional* | `string` Match versions older than a duration. |
| `cleanupPolicies[].condition.packageNamePrefixes` *Optional* | `list (string)` Match versions by package prefix. Applied on any prefix match. |
| `cleanupPolicies[].condition.packageNamePrefixes[]` *Optional* | `string` <br /> |
| `cleanupPolicies[].condition.tagPrefixes` *Optional* | `list (string)` Match versions by tag prefix. Applied on any prefix match. |
| `cleanupPolicies[].condition.tagPrefixes[]` *Optional* | `string` <br /> |
| `cleanupPolicies[].condition.tagState` *Optional* | `string` Match versions by tag status. |
| `cleanupPolicies[].condition.versionNamePrefixes` *Optional* | `list (string)` Match versions by version name prefix. Applied on any prefix match. |
| `cleanupPolicies[].condition.versionNamePrefixes[]` *Optional* | `string` <br /> |
| `cleanupPolicies[].id` *Optional* | `string` The user-provided ID of the cleanup policy. |
| `cleanupPolicies[].mostRecentVersions` *Optional* | `object` Policy condition for retaining a minimum number of versions. May only be specified with a Keep action. |
| `cleanupPolicies[].mostRecentVersions.keepCount` *Optional* | `integer` Minimum number of versions to keep. |
| `cleanupPolicies[].mostRecentVersions.packageNamePrefixes` *Optional* | `list (string)` List of package name prefixes that will apply this rule. |
| `cleanupPolicies[].mostRecentVersions.packageNamePrefixes[]` *Optional* | `string` <br /> |
| `cleanupPolicyDryRun` *Optional* | `boolean` Optional. If true, the cleanup pipeline is prevented from deleting versions in this repository. |
| `description` *Optional* | `string` The user-provided description of the repository. |
| `dockerConfig` *Optional* | `object` Docker repository config contains repository level configuration for the repositories of docker type. |
| `dockerConfig.immutableTags` *Optional* | `boolean` The repository which enabled this flag prevents all tags from being modified, moved or deleted. This does not prevent tags from being created. |
| `format` *Optional* | `string` Optional. The format of packages that are stored in the repository. |
| `kmsKeyRef` *Optional* | `object` 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. |
| `kmsKeyRef.external` *Optional* | `string` A reference to an externally managed KMSCryptoKey resource. Should be in the format "projects/{{projectID}}/locations/{{location}}/keyRings/{{keyring}}/cryptoKeys/{{cryptokey}}". |
| `kmsKeyRef.name` *Optional* | `string` The name of a KMSCryptoKey resource. |
| `kmsKeyRef.namespace` *Optional* | `string` The namespace of a KMSCryptoKey resource. |
| `location` *Required* | `string` Immutable. The name of the location this repository is located in. |
| `mavenConfig` *Optional* | `object` Maven repository config contains repository level configuration for the repositories of maven type. |
| `mavenConfig.allowSnapshotOverwrites` *Optional* | `boolean` The repository with this flag will allow publishing the same snapshot versions. |
| `mavenConfig.versionPolicy` *Optional* | `string` Version policy defines the versions that the registry will accept. |
| `mode` *Optional* | `string` Optional. The mode of the repository. |
| `remoteRepositoryConfig` *Optional* | `object` Configuration specific for a Remote Repository. |
| `remoteRepositoryConfig.commonRepository` *Optional* | `object` Common remote repository settings. |
| `remoteRepositoryConfig.commonRepository.uri` *Optional* | `string` Required. A common public repository base for remote repository. |
| `remoteRepositoryConfig.description` *Optional* | `string` The description of the remote source. |
| `remoteRepositoryConfig.dockerRepository` *Optional* | `object` Specific settings for a Docker remote repository. |
| `remoteRepositoryConfig.dockerRepository.publicRepository` *Optional* | `string` One of the publicly available Docker repositories supported by Artifact Registry. |
| `remoteRepositoryConfig.mavenRepository` *Optional* | `object` Specific settings for a Maven remote repository. |
| `remoteRepositoryConfig.mavenRepository.publicRepository` *Optional* | `string` One of the publicly available Maven repositories supported by Artifact Registry. |
| `remoteRepositoryConfig.npmRepository` *Optional* | `object` Specific settings for an Npm remote repository. |
| `remoteRepositoryConfig.npmRepository.publicRepository` *Optional* | `string` One of the publicly available Npm repositories supported by Artifact Registry. |
| `remoteRepositoryConfig.pythonRepository` *Optional* | `object` Specific settings for a Python remote repository. |
| `remoteRepositoryConfig.pythonRepository.publicRepository` *Optional* | `string` One of the publicly available Python repositories supported by Artifact Registry. |
| `resourceID` *Optional* | `string` The ArtifactRegistryRepository name. If not given, the metadata.name will be used. |
| `virtualRepositoryConfig` *Optional* | `object` Configuration specific for a Virtual Repository. |
| `virtualRepositoryConfig.upstreamPolicies` *Optional* | `list (object)` Policies that configure the upstream artifacts distributed by the Virtual Repository. Upstream policies cannot be set on a standard repository. |
| `virtualRepositoryConfig.upstreamPolicies[]` *Optional* | `object` <br /> |
| `virtualRepositoryConfig.upstreamPolicies[].id` *Optional* | `string` The user-provided ID of the upstream policy. |
| `virtualRepositoryConfig.upstreamPolicies[].priority` *Optional* | `integer` Entries with a greater priority value take precedence in the pull order. |
| `virtualRepositoryConfig.upstreamPolicies[].repositoryRef` *Optional* | `object` A reference to the repository resource, for example: \`projects/p1/locations/us-central1/repositories/repo1\`. |
| `virtualRepositoryConfig.upstreamPolicies[].repositoryRef.external` *Optional* | `string` A reference to an externally managed ArtifactRegistryRepository resource. Should be in the format "projects/{{projectID}}/locations/{{location}}/repositories/{{repositoryID}}". |
| `virtualRepositoryConfig.upstreamPolicies[].repositoryRef.name` *Optional* | `string` The name of an ArtifactRegistryRepository resource. |
| `virtualRepositoryConfig.upstreamPolicies[].repositoryRef.namespace` *Optional* | `string` The namespace of an ArtifactRegistryRepository resource. |

### Status

#### Schema

```yaml
conditions:
- lastTransitionTime: string
  message: string
  reason: string
  status: string
  type: string
createTime: string
name: string
observedGeneration: integer
updateTime: string
```

| Fields ||
|---|---|
| `conditions` | `list (object)` Conditions represent the latest available observations of the object's current state. |
| `conditions[]` | `object` <br /> |
| `conditions[].lastTransitionTime` | `string` Last time the condition transitioned from one status to another. |
| `conditions[].message` | `string` Human-readable message indicating details about last transition. |
| `conditions[].reason` | `string` Unique, one-word, CamelCase reason for the condition's last transition. |
| `conditions[].status` | `string` Status is the status of the condition. Can be True, False, Unknown. |
| `conditions[].type` | `string` Type is the type of the condition. |
| `createTime` | `string` Output only. The time when the repository was created. |
| `name` | `string` The name of the repository, for example: "repo1". |
| `observedGeneration` | `integer` ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller. If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource. |
| `updateTime` | `string` Output only. The time when the repository was last updated. |

## Sample YAML(s)

### Typical Use Case

```yaml
apiVersion: artifactregistry.cnrm.cloud.google.com/v1beta1
kind: ArtifactRegistryRepository
metadata:
  name: artifactregistryrepository-sample
  labels:
    label-one: "value-one"
spec:
  format: DOCKER
  location: us-west1
```

> [!NOTE]
> **Note:** If you have any trouble with instantiating the resource, refer to [Troubleshoot Config Connector](https://docs.cloud.google.com/config-connector/docs/troubleshooting.md.txt).