-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
add resource "azurerm_data_protection_backup_policy_postgresql" #12072
add resource "azurerm_data_protection_backup_policy_postgresql" #12072
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ms-henglu, i've given this a review and i'm having a hard time understanding what some of these properties do/mean - like what tagging means wrt a backup retention, see my comments left inline
website/docs/r/data_protection_backup_policy_postgresql.html.markdown
Outdated
Show resolved
Hide resolved
website/docs/r/data_protection_backup_policy_postgresql.html.markdown
Outdated
Show resolved
Hide resolved
website/docs/r/data_protection_backup_policy_postgresql.html.markdown
Outdated
Show resolved
Hide resolved
website/docs/r/data_protection_backup_policy_postgresql.html.markdown
Outdated
Show resolved
Hide resolved
website/docs/r/data_protection_backup_policy_postgresql.html.markdown
Outdated
Show resolved
Hide resolved
azurerm/internal/services/dataprotection/data_protection_backup_policy_postgresql_resource.go
Outdated
Show resolved
Hide resolved
ForceNew: true, | ||
}, | ||
|
||
"repeating_time_intervals": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"repeating_time_intervals": { | |
"duration": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually this is not duration, this defines when to run a backup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so maybe this is best to pull it up one level into backup_repeating_time_intervals
- rule makes little sense here
MaxItems: 1, | ||
Elem: &schema.Resource{ | ||
Schema: map[string]*schema.Schema{ | ||
"name": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this make sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I'll remove this and use default name BackupWeekly
which portal uses.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
backup weekly doesn't make sense if the user picks something other then weekly, so maybe just "BackupIntervals"
azurerm/internal/services/dataprotection/data_protection_backup_policy_postgresql_resource.go
Outdated
Show resolved
Hide resolved
hi @katbyte , thank you so much for review this complicated PR. I added one commit according to your suggestions. Here's an example and I'll explain what those properties mean.
|
@katbyte ,hi, I added one more commit to rename backup_rule to backup_repeating_time_intervals, could you please take another look? Thanks! |
|
||
* `tagging_criteria` - (Required) A `tagging_criteria` block as defined below. Changing this forces a new Backup Policy PostgreSQL to be created. | ||
|
||
* `tagging_priority` - (Required) Retention Tag priority. Changing this forces a new Backup Policy Postgre Sql to be created. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Retention Tag priority
is not a full sentance
* `tagging_criteria` - (Required) A `tagging_criteria` block as defined below. Changing this forces a new Backup Policy PostgreSQL to be created. | ||
|
||
* `tagging_priority` - (Required) Retention Tag priority. Changing this forces a new Backup Policy Postgre Sql to be created. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we really need tagging here? it makes little sense and is confusing how about:
* `tagging_criteria` - (Required) A `tagging_criteria` block as defined below. Changing this forces a new Backup Policy PostgreSQL to be created. | |
* `tagging_priority` - (Required) Retention Tag priority. Changing this forces a new Backup Policy Postgre Sql to be created. | |
* `criteria` - (Required) A `tagging_criteria` block as defined below. Changing this forces a new Backup Policy PostgreSQL to be created. | |
* `priority` - (Required) Retention Tag priority. Changing this forces a new Backup Policy Postgre Sql to be created. |
so we get retention.criteria
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, I'll modify it.
@katbyte Hi, I added one more commit to rename tagging_prioriy and tagging_criteria to priority and criteria, please check again, thanks! |
…s-policy-postgresql
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
This functionality has been released in v2.64.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
The tests are listed as follows.