Skip to content

Commit 63c168b

Browse files
refs platform/board#4025: add vulnerability_scanning_config block (#26)
1 parent 2743d0d commit 63c168b

5 files changed

Lines changed: 21 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ Following semver, any non backwards compatible feature implies that the next rel
2020

2121
## [Unreleased]
2222

23+
## [0.12.0] - 2025-11-24
24+
25+
[Compare with previous version](https://github.com/sparkfabrik/terraform-google-gcp-artifact-registry/compare/0.11.1...0.12.0)
26+
27+
### Changed
28+
29+
**:warning: BREAKING CHANGES**
30+
31+
- FEAT (refs platform/board#4025): add `vulnerability_scanning_config` block. This configuration require `hashicorp/google` provider to `>= 6.15.0` version ([CHANGELOG](https://github.com/hashicorp/terraform-provider-google/blob/main/CHANGELOG.md#6150-january-6-2025))
32+
2333
## [0.11.1] - 2025-11-07
2434

2535
[Compare with previous version](https://github.com/sparkfabrik/terraform-google-gcp-artifact-registry/compare/0.11.0...0.11.1)
@@ -36,7 +46,7 @@ Following semver, any non backwards compatible feature implies that the next rel
3646

3747
⚠️ **BREAKING CHANGES**
3848

39-
- FEAT (refs platform/board#3863): Add default cleanup cache policies. If you don't want it set `cleanup_policies_enable_default` attribute (in the *repository* item defined into `repositories` variable) to `false`
49+
- FEAT (refs platform/board#3863): Add default cleanup cache policies. If you don't want it set `cleanup_policies_enable_default` attribute (in the _repository_ item defined into `repositories` variable) to `false`
4050

4151
## [0.10.2] - 2025-09-04
4252

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ This module is provided without any kind of warranty and is GPL3 licensed.
1313

1414
| Name | Version |
1515
|------|---------|
16-
| <a name="provider_google"></a> [google](#provider\_google) | >= 5.26.0 |
16+
| <a name="provider_google"></a> [google](#provider\_google) | >= 6.15.0 |
1717

1818
## Requirements
1919

2020
| Name | Version |
2121
|------|---------|
2222
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
23-
| <a name="requirement_google"></a> [google](#requirement\_google) | >= 5.26.0 |
23+
| <a name="requirement_google"></a> [google](#requirement\_google) | >= 6.15.0 |
2424

2525
## Inputs
2626

@@ -33,7 +33,7 @@ This module is provided without any kind of warranty and is GPL3 licensed.
3333
| <a name="input_default_location"></a> [default\_location](#input\_default\_location) | The default location for the Artifact Registry repositories. | `string` | `"europe-west1"` | no |
3434
| <a name="input_enable_api"></a> [enable\_api](#input\_enable\_api) | Enable the Artifact Registry API. | `bool` | `true` | no |
3535
| <a name="input_project_id"></a> [project\_id](#input\_project\_id) | The GCP project ID that hosts the Artifact Registry. | `string` | n/a | yes |
36-
| <a name="input_repositories"></a> [repositories](#input\_repositories) | List of Artifact Registry repositories to create. | <pre>map(object({<br> description = string<br> format = optional(string, "DOCKER")<br> mode = optional(string, "STANDARD_REPOSITORY")<br> cleanup_policy_dry_run = optional(bool, true)<br> cleanup_policies_enable_default = optional(bool, true)<br> cleanup_policies = optional(map(object({<br> action = optional(string, ""),<br> condition = optional(object({<br> tag_state = optional(string),<br> tag_prefixes = optional(list(string), []),<br> version_name_prefixes = optional(list(string), []),<br> package_name_prefixes = optional(list(string), []),<br> older_than = optional(string),<br> newer_than = optional(string),<br> }), {}),<br> most_recent_versions = optional(object({<br> package_name_prefixes = optional(list(string), []),<br> keep_count = optional(number, null)<br> }), {})<br> })), {})<br> docker_immutable_tags = optional(bool, false)<br> virtual_repository_config = optional(map(object({<br> repository = string<br> priority = optional(number, 0)<br> })), null)<br> remote_repository_config_docker = optional(object({<br> description = optional(string, "")<br> custom_repository_uri = string<br> disable_upstream_validation = optional(bool, false)<br> username_password_credentials_username = optional(string, "")<br> username_password_credentials_password_secret_name = optional(string, "")<br> username_password_credentials_password_secret_version = optional(string, "")<br> }), null)<br> readers = optional(list(string), [])<br> writers = optional(list(string), [])<br> location = optional(string, "")<br> labels = optional(map(string), {})<br> }))</pre> | n/a | yes |
36+
| <a name="input_repositories"></a> [repositories](#input\_repositories) | List of Artifact Registry repositories to create. | <pre>map(object({<br> description = string<br> format = optional(string, "DOCKER")<br> mode = optional(string, "STANDARD_REPOSITORY")<br> vulnerability_scanning_enabled = optional(bool, false)<br> cleanup_policy_dry_run = optional(bool, true)<br> cleanup_policies_enable_default = optional(bool, true)<br> cleanup_policies = optional(map(object({<br> action = optional(string, ""),<br> condition = optional(object({<br> tag_state = optional(string),<br> tag_prefixes = optional(list(string), []),<br> version_name_prefixes = optional(list(string), []),<br> package_name_prefixes = optional(list(string), []),<br> older_than = optional(string),<br> newer_than = optional(string),<br> }), {}),<br> most_recent_versions = optional(object({<br> package_name_prefixes = optional(list(string), []),<br> keep_count = optional(number, null)<br> }), {})<br> })), {})<br> docker_immutable_tags = optional(bool, false)<br> virtual_repository_config = optional(map(object({<br> repository = string<br> priority = optional(number, 0)<br> })), null)<br> remote_repository_config_docker = optional(object({<br> description = optional(string, "")<br> custom_repository_uri = string<br> disable_upstream_validation = optional(bool, false)<br> username_password_credentials_username = optional(string, "")<br> username_password_credentials_password_secret_name = optional(string, "")<br> username_password_credentials_password_secret_version = optional(string, "")<br> }), null)<br> readers = optional(list(string), [])<br> writers = optional(list(string), [])<br> location = optional(string, "")<br> labels = optional(map(string), {})<br> }))</pre> | n/a | yes |
3737

3838
## Outputs
3939

main.tf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,11 @@ resource "google_artifact_registry_repository" "repositories" {
147147
cleanup_policy_dry_run = each.value.cleanup_policy_dry_run
148148
labels = merge(var.default_labels, var.additional_labels, each.value.labels)
149149

150-
dynamic "cleanup_policies" {
150+
vulnerability_scanning_config {
151+
enablement_config = each.value.vulnerability_scanning_enabled ? "INHERITED" : "DISABLED"
152+
}
153+
154+
dynamic "cleanup_policies" {
151155
for_each = each.value.cleanup_policies
152156
content {
153157
id = cleanup_policies.key

variables.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ variable "repositories" {
2222
description = string
2323
format = optional(string, "DOCKER")
2424
mode = optional(string, "STANDARD_REPOSITORY")
25+
vulnerability_scanning_enabled = optional(bool, false)
2526
cleanup_policy_dry_run = optional(bool, true)
2627
cleanup_policies_enable_default = optional(bool, true)
2728
cleanup_policies = optional(map(object({

versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
google = {
66
source = "hashicorp/google"
7-
version = ">= 5.26.0"
7+
version = ">= 6.15.0"
88
}
99
}
1010
}

0 commit comments

Comments
 (0)