Skip to content

Commit 5652bb1

Browse files
Add activity journal feature for google_storage_insights_dataset_config (#15202)
1 parent ce7e0a4 commit 5652bb1

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

mmv1/products/storageinsights/DatasetConfig.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ properties:
119119
description: |
120120
Number of days of history that must be retained.
121121
required: true
122+
- name: 'activityDataRetentionPeriodDays'
123+
type: Integer
124+
description: |
125+
Number of days of activity data that must be retained. If not specified, retentionPeriodDays will be used. Set to 0 to turn off the activity data.
122126
- name: 'link'
123127
type: NestedObject
124128
description: |

mmv1/templates/terraform/examples/storage_insights_dataset_config_excludes.tf.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ resource "google_storage_insights_dataset_config" "{{$.PrimaryResourceId}}" {
22
location = "us-central1"
33
dataset_config_id = "{{$.Vars.dataset_config_id}}"
44
retention_period_days = 1
5+
activity_data_retention_period_days = 2
56
organization_scope = true
67
identity {
78
type = "IDENTITY_TYPE_PER_PROJECT"

mmv1/templates/terraform/pre_update/storage_insights_dataset_config.go.tmpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ if d.HasChange("retention_period_days") {
88
updateMask = append(updateMask, "retentionPeriodDays")
99
}
1010

11+
if d.HasChange("activity_data_retention_period_days") {
12+
updateMask = append(updateMask, "activityDataRetentionPeriodDays")
13+
}
14+
1115
if d.HasChange("description") {
1216
updateMask = append(updateMask, "description")
1317
}

mmv1/third_party/terraform/services/storageinsights/resource_storage_insights_dataset_config_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ resource "google_storage_insights_dataset_config" "config" {
220220
location = "us-central1"
221221
dataset_config_id = "tf_test_my_config%{random_suffix}"
222222
retention_period_days = 1
223+
activity_data_retention_period_days = 2
223224
source_folders {
224225
folder_numbers = ["123", "456"]
225226
}
@@ -236,6 +237,7 @@ resource "google_storage_insights_dataset_config" "config" {
236237
location = "us-central1"
237238
dataset_config_id = "tf_test_my_config%{random_suffix}"
238239
retention_period_days = 1
240+
activity_data_retention_period_days = 0
239241
organization_scope = true
240242
identity {
241243
type = "IDENTITY_TYPE_PER_CONFIG"

0 commit comments

Comments
 (0)