2020-05-26 03:03:15 -07:00
|
|
|
# Google Cloud Artifact Registry Module
|
|
|
|
|
|
|
|
This module simplifies the creation of repositories using Google Cloud Artifact Registry.
|
|
|
|
|
|
|
|
Note: Artifact Registry is still in beta, hence this module currently uses the beta provider.
|
|
|
|
|
|
|
|
## Example
|
|
|
|
|
|
|
|
```hcl
|
|
|
|
module "docker_artifact_registry" {
|
|
|
|
source = "./modules/artifact-registry"
|
|
|
|
project_id = "myproject"
|
|
|
|
location = "europe-west1"
|
|
|
|
format = "DOCKER"
|
|
|
|
id = "myregistry"
|
2020-11-04 07:56:57 -08:00
|
|
|
iam = {
|
2020-05-26 03:03:15 -07:00
|
|
|
"roles/artifactregistry.admin" = ["group:cicd@example.com"]
|
|
|
|
}
|
|
|
|
}
|
2020-11-07 01:28:33 -08:00
|
|
|
# tftest:modules=1:resources=2
|
2020-05-26 03:03:15 -07:00
|
|
|
```
|
|
|
|
<!-- BEGIN TFDOC -->
|
2021-12-20 23:51:51 -08:00
|
|
|
|
2020-05-26 03:03:15 -07:00
|
|
|
## Variables
|
|
|
|
|
|
|
|
| name | description | type | required | default |
|
2021-12-20 23:51:51 -08:00
|
|
|
|---|---|:---:|:---:|:---:|
|
2022-01-22 04:34:35 -08:00
|
|
|
| [id](variables.tf#L35) | Repository id | <code>string</code> | ✓ | |
|
|
|
|
| [project_id](variables.tf#L52) | Registry project id. | <code>string</code> | ✓ | |
|
|
|
|
| [description](variables.tf#L17) | An optional description for the repository | <code>string</code> | | <code>"Terraform-managed registry"</code> |
|
|
|
|
| [format](variables.tf#L23) | Repository format. One of DOCKER or UNSPECIFIED | <code>string</code> | | <code>"DOCKER"</code> |
|
|
|
|
| [iam](variables.tf#L29) | IAM bindings in {ROLE => [MEMBERS]} format. | <code>map(list(string))</code> | | <code>{}</code> |
|
|
|
|
| [labels](variables.tf#L40) | Labels to be attached to the registry. | <code>map(string)</code> | | <code>{}</code> |
|
|
|
|
| [location](variables.tf#L46) | Registry location. Use `gcloud beta artifacts locations list' to get valid values | <code>string</code> | | <code>null</code> |
|
2020-05-26 03:03:15 -07:00
|
|
|
|
|
|
|
## Outputs
|
|
|
|
|
|
|
|
| name | description | sensitive |
|
|
|
|
|---|---|:---:|
|
2022-01-22 04:34:35 -08:00
|
|
|
| [id](outputs.tf#L17) | Repository id | |
|
|
|
|
| [name](outputs.tf#L22) | Repository name | |
|
2021-12-20 23:51:51 -08:00
|
|
|
|
2020-05-26 03:03:15 -07:00
|
|
|
<!-- END TFDOC -->
|