Skip to content

Commit

Permalink
deprecate long_term_retention_policy.immutable_backups_enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
catriona-m committed Aug 21, 2024
1 parent e8fb7a8 commit 81572c1
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions internal/services/mssql/helper/sql_retention_policies.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,6 @@ func LongTermRetentionPolicySchema() *pluginsdk.Schema {
ValidateFunc: validation.IntBetween(0, 52),
AtLeastOneOf: atLeastOneOf,
},

"immutable_backups_enabled": {
Type: pluginsdk.TypeBool,
Optional: true,
Default: false,
},
},
},
}
Expand Down Expand Up @@ -120,8 +114,6 @@ func ExpandLongTermRetentionPolicy(input []interface{}) *longtermretentionpolici
MonthlyRetention: pointer.To("PT0S"),
YearlyRetention: pointer.To("PT0S"),
WeekOfYear: pointer.To(int64(1)),
// TODO removed from model - check this
// MakeBackupsImmutable: pointer.To(false),
}

if v, ok := policy["weekly_retention"].(string); ok && v != "" {
Expand All @@ -139,11 +131,6 @@ func ExpandLongTermRetentionPolicy(input []interface{}) *longtermretentionpolici
if v, ok := policy["week_of_year"].(int); ok && v != 0 {
output.WeekOfYear = pointer.To(int64(v))
}

/* if v, ok := policy["immutable_backups_enabled"].(bool); ok {
output.MakeBackupsImmutable = pointer.To(v)
}*/

return pointer.To(output)
}

Expand Down Expand Up @@ -172,18 +159,12 @@ func FlattenLongTermRetentionPolicy(input *longtermretentionpolicies.LongTermRet
yearlyRetention = *input.Properties.YearlyRetention
}

/* immutableBackupsEnabled := false
if input.Properties.MakeBackupsImmutable != nil {
immutableBackupsEnabled = *input.Properties.MakeBackupsImmutable
}*/

return []interface{}{
map[string]interface{}{
"monthly_retention": monthlyRetention,
"weekly_retention": weeklyRetention,
"week_of_year": weekOfYear,
"yearly_retention": yearlyRetention,
// "immutable_backups_enabled": immutableBackupsEnabled,
},
}
}
Expand Down

0 comments on commit 81572c1

Please sign in to comment.