Skip to content

Commit be22d4e

Browse files
committed
Add max_custom_on_demand_retention_days in Backup Plan
1 parent 57e2a04 commit be22d4e

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

mmv1/products/backupdr/BackupPlan.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ properties:
118118
description: |
119119
When the `BackupPlan` was last updated.
120120
output: true
121+
- name: 'maxCustomOnDemandRetentionDays'
122+
type: Integer
123+
description: |
124+
The maximum number of days for which an on-demand backup taken with custom retention can be retained.
121125
- name: 'backupRules'
122126
type: Array
123127
description: |

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ resource "google_backup_dr_backup_plan" "{{$.PrimaryResourceId}}" {
1111
backup_plan_id = "{{index $.Vars "backup_plan_id"}}"
1212
resource_type = "compute.googleapis.com/Disk"
1313
backup_vault = google_backup_dr_backup_vault.my_backup_vault.id
14+
max_custom_on_demand_retention_days = 30
1415

1516
backup_rules {
1617
rule_id = "rule-1"

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ resource "google_backup_dr_backup_plan" "{{$.PrimaryResourceId}}" {
99
backup_plan_id = "{{index $.Vars "backup_plan_id"}}"
1010
resource_type = "compute.googleapis.com/Instance"
1111
backup_vault = google_backup_dr_backup_vault.my_backup_vault.id
12+
max_custom_on_demand_retention_days = 30
1213

1314
backup_rules {
1415
rule_id = "rule-1"

mmv1/third_party/terraform/services/backupdr/resource_backup_dr_backup_plan_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ resource "google_backup_dr_backup_plan" "bp" {
101101
backup_plan_id = "tf-test-bp-test-%{random_suffix}"
102102
resource_type = "compute.googleapis.com/Instance"
103103
backup_vault = google_backup_dr_backup_vault.my-backup-vault.name
104+
max_custom_on_demand_retention_days = 30
104105
105106
backup_rules {
106107
rule_id = "rule-1"
@@ -183,6 +184,7 @@ resource "google_backup_dr_backup_plan" "bp" {
183184
backup_plan_id = "tf-test-bp-test-%{random_suffix}"
184185
resource_type = "compute.googleapis.com/Instance"
185186
backup_vault = google_backup_dr_backup_vault.my-backup-vault.name
187+
max_custom_on_demand_retention_days = 45
186188
187189
backup_rules {
188190
rule_id = "rule-1"

0 commit comments

Comments
 (0)