Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

lizard-boy
Copy link

No description provided.

Signed-off-by: Kobi Samoray <[email protected]>
Copy link

@greptile-apps greptile-apps bot left a 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 in nsxt/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

Comment on lines +198 to +200
func resourceNsxtPolicyBackupConfigCreate(d *schema.ResourceData, m interface{}) error {
return resourceNsxtPolicyBackupConfigUpdate(d, m)
}
Copy link

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)
Copy link

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.
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants