Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(artifact-registry): Add support for CMEK #1452

Merged
merged 6 commits into from
Jun 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions modules/artifact-registry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ module "docker_artifact_registry" {

| name | description | type | required | default |
|---|---|:---:|:---:|:---:|
| [id](variables.tf#L35) | Repository id. | <code>string</code> | ✓ | |
| [project_id](variables.tf#L52) | Registry project id. | <code>string</code> | ✓ | |
| [id](variables.tf#L41) | Repository id. | <code>string</code> | ✓ | |
| [project_id](variables.tf#L58) | Registry project id. | <code>string</code> | ✓ | |
| [description](variables.tf#L17) | An optional description for the repository. | <code>string</code> | | <code>&#34;Terraform-managed registry&#34;</code> |
| [format](variables.tf#L23) | Repository format. One of DOCKER or UNSPECIFIED. | <code>string</code> | | <code>&#34;DOCKER&#34;</code> |
| [iam](variables.tf#L29) | IAM bindings in {ROLE => [MEMBERS]} format. | <code>map&#40;list&#40;string&#41;&#41;</code> | | <code>&#123;&#125;</code> |
| [labels](variables.tf#L40) | Labels to be attached to the registry. | <code>map&#40;string&#41;</code> | | <code>&#123;&#125;</code> |
| [location](variables.tf#L46) | Registry location. Use `gcloud beta artifacts locations list' to get valid values. | <code>string</code> | | <code>null</code> |
| [encryption_key](variables.tf#L23) | The KMS key name to use for encryption at rest. | <code>string</code> | | <code>null</code> |
| [format](variables.tf#L29) | Repository format. One of DOCKER or UNSPECIFIED. | <code>string</code> | | <code>&#34;DOCKER&#34;</code> |
| [iam](variables.tf#L35) | IAM bindings in {ROLE => [MEMBERS]} format. | <code>map&#40;list&#40;string&#41;&#41;</code> | | <code>&#123;&#125;</code> |
| [labels](variables.tf#L46) | Labels to be attached to the registry. | <code>map&#40;string&#41;</code> | | <code>&#123;&#125;</code> |
| [location](variables.tf#L52) | Registry location. Use `gcloud beta artifacts locations list' to get valid values. | <code>string</code> | | <code>null</code> |

## Outputs

Expand Down
1 change: 1 addition & 0 deletions modules/artifact-registry/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ resource "google_artifact_registry_repository" "registry" {
format = var.format
labels = var.labels
repository_id = var.id
kms_key_name = var.encryption_key
}

resource "google_artifact_registry_repository_iam_binding" "bindings" {
Expand Down
6 changes: 6 additions & 0 deletions modules/artifact-registry/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ variable "description" {
default = "Terraform-managed registry"
}

variable "encryption_key" {
description = "The KMS key name to use for encryption at rest."
type = string
default = null
}

variable "format" {
description = "Repository format. One of DOCKER or UNSPECIFIED."
type = string
Expand Down