-
Notifications
You must be signed in to change notification settings - Fork 0
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
[WIP]: Implement backup resource #5
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Kobi Samoray <[email protected]>
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.
PR Summary
This pull request implements a new resource for NSX-T Policy Backup Configuration, allowing users to manage automated backups through Terraform.
- Added
nsxt_policy_backup_config
resource innsxt/resource_nsxt_policy_backup_config.go
with CRUD operations and schema definition - Implemented basic acceptance test in
nsxt/resource_nsxt_policy_backup_config_test.go
- Created documentation for the new resource in
website/docs/r/policy_backup_config.html.markdown
- Registered the new resource in the provider's ResourcesMap in
nsxt/provider.go
4 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings
func resourceNsxtPolicyBackupConfigCreate(d *schema.ResourceData, m interface{}) error { | ||
return resourceNsxtPolicyBackupConfigUpdate(d, m) | ||
} |
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.
logic: Create function directly calls Update. Consider adding a separate implementation for Create if needed
return handleReadError(d, "PolicyBackupConfig", "", err) | ||
} | ||
d.Set("inventory_summary_interval", obj.InventorySummaryInterval) | ||
d.Set("passphrase", obj.Passphrase) |
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.
style: Avoid setting sensitive data like passphrase in state
The following arguments are supported: | ||
|
||
* `after_inventory_update_interval` - (Optional) A number of seconds after a last backup, that needs to pass, before a topology change will trigger a generation of a new cluster/node backups. | ||
* `backup_enabled` - (Optional) true if automated backup is enabled. Default is false. |
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.
style: Capitalize 'true' for consistency with Terraform syntax
No description provided.