-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
V4 data protection on v4-temp-design (#31)
* Feat/v4 recovery points on v4-recovery-points (#26) * add sdk, create client for Data Protection and add Recovery Point Api Client * implement get recovery point data source * implement list recovery points data source * implement CRUD recovery points resource, update api is not supported for RP * implement implement recovery points resource acc tests, in progress * recovery points datasource acc tests. * recovery points examples * recovery points docs * create Vg within RP test cases * fix provider version on examples * add test config on test_config_v2.json file * fix acc test when create vg, remove unnecessary filepath parameter, remove vm uuid from test_config_v2.json file * Feat/v4 replicate recovery points on v4 recovery points (#27) * add sdk, create client for Data Protection and add Recovery Point Api Client * implement get recovery point data source * implement list recovery points data source * implement CRUD recovery points resource, update api is not supported for RP * implement implement recovery points resource acc tests, in progress * recovery points datasource acc tests. * recovery points examples * recovery points docs * create Vg within RP test cases * fix provider version on examples * implement recovery point replicate in progress * implementation of recovery point replication * add test config on test_config_v2.json file * fix acc test when create vg, remove unnecessary filepath parameter, remove vm uuid from test_config_v2.json file * implement acc test for recovery point replication * add examples for recovery point replication * add docs for recovery point replication * add replicated_rp_ext_id attribute to store the replicated recovery point uuid * Feat/v4 recovery points on v4 data protection (#28) * add sdk, create client for Data Protection and add Recovery Point Api Client * implement get recovery point data source * implement list recovery points data source * implement CRUD recovery points resource, update api is not supported for RP * implement implement recovery points resource acc tests, in progress * recovery points datasource acc tests. * recovery points examples * recovery points docs * create Vg within RP test cases * fix provider version on examples * add test config on test_config_v2.json file * fix acc test when create vg, remove unnecessary filepath parameter, remove vm uuid from test_config_v2.json file * fix terraform plan for recovery point, there is no update in the resource just changing in the order of vm_recovery_points and volume_group_recovery_points array * fix comments on the added DiffSub function * Feat/v4 recovery point restore on v4-data-protection (#29) * add sdk, create client for Data Protection and add Recovery Point Api Client * implement get recovery point data source * implement list recovery points data source * implement CRUD recovery points resource, update api is not supported for RP * implement implement recovery points resource acc tests, in progress * recovery points datasource acc tests. * recovery points examples * recovery points docs * create Vg within RP test cases * fix provider version on examples * add test config on test_config_v2.json file * fix acc test when create vg, remove unnecessary filepath parameter, remove vm uuid from test_config_v2.json file * implement recovery point restore resource * fix terraform plan for recovery point, there is no update in the resource just changing in the order of vm_recovery_points and volume_group_recovery_points array * fix terraform plan for recovery point, there is no update in the resource just changing in the order of vm_recovery_points and volume_group_recovery_points array * fix terraform plan for recovery point, there is no update in the resource just changing in the order of vm_recovery_points and volume_group_recovery_points array * fix comments on the added DiffSub function * remove commented code * acc tests for recovery point restore * examples for recovery point restore * examples for recovery point restore * docs for recovery point restore * Feat/v4 vm recovery point info (#30) * add sdk, create client for Data Protection and add Recovery Point Api Client * implement get recovery point data source * implement list recovery points data source * implement CRUD recovery points resource, update api is not supported for RP * implement implement recovery points resource acc tests, in progress * recovery points datasource acc tests. * recovery points examples * recovery points docs * create Vg within RP test cases * fix provider version on examples * add test config on test_config_v2.json file * fix acc test when create vg, remove unnecessary filepath parameter, remove vm uuid from test_config_v2.json file * implement recovery point restore resource * fix terraform plan for recovery point, there is no update in the resource just changing in the order of vm_recovery_points and volume_group_recovery_points array * fix terraform plan for recovery point, there is no update in the resource just changing in the order of vm_recovery_points and volume_group_recovery_points array * fix terraform plan for recovery point, there is no update in the resource just changing in the order of vm_recovery_points and volume_group_recovery_points array * fix comments on the added DiffSub function * remove commented code * acc tests for recovery point restore * examples for recovery point restore * examples for recovery point restore * docs for recovery point restore * implement vm recovery point info * Acc tests for vm recovery point info * examples for vm recovery point info * docs for vm recovery point info * fix links schema
- Loading branch information
1 parent
581dcf0
commit feff396
Showing
37 changed files
with
3,796 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
terraform { | ||
required_providers { | ||
nutanix = { | ||
source = "nutanix/nutanix" | ||
version = "2.0" | ||
} | ||
} | ||
} | ||
|
||
#definig nutanix configuration | ||
provider "nutanix" { | ||
username = var.nutanix_username | ||
password = var.nutanix_password | ||
endpoint = var.nutanix_endpoint | ||
port = 9440 | ||
insecure = true | ||
} | ||
|
||
|
||
# create RP with Vm Rp | ||
resource "nutanix_recovery_points_v2" "rp-example" { | ||
name = "terraform-test-recovery-point" | ||
expiration_time = "2024-09-17T09:20:42Z" | ||
status = "COMPLETE" | ||
recovery_point_type = "APPLICATION_CONSISTENT" | ||
vm_recovery_points { | ||
vm_ext_id = "<Vm-uuid-1>" | ||
} | ||
} | ||
|
||
# replicate RP | ||
resource "nutanix_recovery_point_replicate_v2" "test" { | ||
ext_id = nutanix_recovery_points_v2.rp-example.id | ||
cluster_ext_id = "<cluster-uuid>" | ||
pc_ext_id = "<pc-uuid>" | ||
depends_on = [nutanix_recovery_points_v2.test] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#define values to the variables to be used in terraform file | ||
nutanix_username = "admin" | ||
nutanix_password = "password" | ||
nutanix_endpoint = "10.xx.xx.xx" | ||
nutanix_port = 9440 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#define the type of variables to be used in terraform file | ||
variable "nutanix_username" { | ||
type = string | ||
} | ||
variable "nutanix_password" { | ||
type = string | ||
} | ||
variable "nutanix_endpoint" { | ||
type = string | ||
} | ||
variable "nutanix_port" { | ||
type = string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
terraform { | ||
required_providers { | ||
nutanix = { | ||
source = "nutanix/nutanix" | ||
version = "2.0" | ||
} | ||
} | ||
} | ||
|
||
#definig nutanix configuration | ||
provider "nutanix" { | ||
username = var.nutanix_username | ||
password = var.nutanix_password | ||
endpoint = var.nutanix_endpoint | ||
port = 9440 | ||
insecure = true | ||
} | ||
|
||
|
||
# create RP with multiple VG and Vms Rp | ||
resource "nutanix_recovery_points_v2" "rp-example" { | ||
name = "terraform-test-recovery-point" | ||
expiration_time = "2024-09-17T09:20:42Z" | ||
status = "COMPLETE" | ||
recovery_point_type = "CRASH_CONSISTENT" | ||
vm_recovery_points { | ||
vm_ext_id = "<Vm-uuid-1>" | ||
} | ||
vm_recovery_points { | ||
vm_ext_id = "<Vm-uuid-2>" | ||
} | ||
volume_group_recovery_points { | ||
volume_group_ext_id = "<VG-uuid-1>" | ||
} | ||
volume_group_recovery_points { | ||
volume_group_ext_id = "<VG-uuid-2>" | ||
} | ||
} | ||
|
||
# restore RP | ||
resource "nutanix_recovery_point_restore_v2" "rp-restore-example" { | ||
ext_id = nutanix_recovery_points_v2.rp-example.id | ||
cluster_ext_id = "<cluster-uuid>" | ||
vm_recovery_point_restore_overrides { | ||
vm_recovery_point_ext_id = nutanix_recovery_points_v2.rp-example.vm_recovery_points[0].ext_id | ||
} | ||
vm_recovery_point_restore_overrides { | ||
vm_recovery_point_ext_id = nutanix_recovery_points_v2.rp-example.vm_recovery_points[1].ext_id | ||
} | ||
volume_group_recovery_point_restore_overrides { | ||
volume_group_recovery_point_ext_id = nutanix_recovery_points_v2.rp-example.volume_group_recovery_points[0].ext_id | ||
volume_group_override_spec { | ||
name = "vg-1-rp-example-restore" | ||
} | ||
} | ||
volume_group_recovery_point_restore_overrides { | ||
volume_group_recovery_point_ext_id = nutanix_recovery_points_v2.rp-example.volume_group_recovery_points[1].ext_id | ||
volume_group_override_spec { | ||
name = "vg-2-rp-example-restore" | ||
} | ||
} | ||
depends_on = [nutanix_recovery_points_v2.test] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#define values to the variables to be used in terraform file | ||
nutanix_username = "admin" | ||
nutanix_password = "password" | ||
nutanix_endpoint = "10.xx.xx.xx" | ||
nutanix_port = 9440 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#define the type of variables to be used in terraform file | ||
variable "nutanix_username" { | ||
type = string | ||
} | ||
variable "nutanix_password" { | ||
type = string | ||
} | ||
variable "nutanix_endpoint" { | ||
type = string | ||
} | ||
variable "nutanix_port" { | ||
type = string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
terraform { | ||
required_providers { | ||
nutanix = { | ||
source = "nutanix/nutanix" | ||
version = "2.0" | ||
} | ||
} | ||
} | ||
|
||
#definig nutanix configuration | ||
provider "nutanix" { | ||
username = var.nutanix_username | ||
password = var.nutanix_password | ||
endpoint = var.nutanix_endpoint | ||
port = 9440 | ||
insecure = true | ||
} | ||
|
||
|
||
# create RP with Vm Rp | ||
resource "nutanix_recovery_points_v2" "rp-example" { | ||
name = "terraform-test-recovery-point" | ||
expiration_time = "2024-09-17T09:20:42Z" | ||
status = "COMPLETE" | ||
recovery_point_type = "APPLICATION_CONSISTENT" | ||
vm_recovery_points { | ||
vm_ext_id = "<Vm-uuid-1>" | ||
} | ||
} | ||
|
||
# create RP with multiple Vm Rp | ||
resource "nutanix_recovery_points_v2" "rp-example" { | ||
name = "terraform-test-recovery-point" | ||
expiration_time = "2024-09-17T09:20:42Z" | ||
status = "COMPLETE" | ||
recovery_point_type = "CRASH_CONSISTENT" | ||
vm_recovery_points { | ||
vm_ext_id = "<Vm-uuid-1>" | ||
} | ||
vm_recovery_points { | ||
vm_ext_id = "<Vm-uuid-2>" | ||
} | ||
} | ||
|
||
# create RP with VG Rp | ||
resource "nutanix_recovery_points_v2" "rp-example" { | ||
name = "terraform-test-recovery-point" | ||
expiration_time = "2024-09-17T09:20:42Z" | ||
status = "COMPLETE" | ||
recovery_point_type = "CRASH_CONSISTENT" | ||
volume_group_recovery_points { | ||
volume_group_ext_id = "<VG-uuid-1>" | ||
} | ||
} | ||
|
||
# create RP with multiple VG Rp | ||
resource "nutanix_recovery_points_v2" "rp-example" { | ||
name = "terraform-test-recovery-point" | ||
expiration_time = "2024-09-17T09:20:42Z" | ||
status = "COMPLETE" | ||
recovery_point_type = "CRASH_CONSISTENT" | ||
volume_group_recovery_points { | ||
volume_group_ext_id = "<VG-uuid-1>" | ||
} | ||
volume_group_recovery_points { | ||
volume_group_ext_id = "<VG-uuid-2>" | ||
} | ||
} | ||
|
||
|
||
# create RP with multiple VG and Vms Rp | ||
resource "nutanix_recovery_points_v2" "rp-example" { | ||
name = "terraform-test-recovery-point" | ||
expiration_time = "2024-09-17T09:20:42Z" | ||
status = "COMPLETE" | ||
recovery_point_type = "CRASH_CONSISTENT" | ||
vm_recovery_points { | ||
vm_ext_id = "<Vm-uuid-1>" | ||
} | ||
vm_recovery_points { | ||
vm_ext_id = "<Vm-uuid-2>" | ||
} | ||
volume_group_recovery_points { | ||
volume_group_ext_id = "<VG-uuid-1>" | ||
} | ||
volume_group_recovery_points { | ||
volume_group_ext_id = "<VG-uuid-2>" | ||
} | ||
} | ||
|
||
# get RP data | ||
data "nutanix_recovery_point_v2" "rp-example" { | ||
ext_id = nutanix_recovery_points_v2.rp-example.id | ||
} | ||
|
||
# list all RP | ||
data "nutanix_recovery_points_v2" "rp-example" {} | ||
|
||
# list all RP with filter | ||
data "nutanix_recovery_points_v2" "rp-example" { | ||
filter = "name eq 'terraform-test-recovery-point'" | ||
} | ||
|
||
# list all RP with limit | ||
data "nutanix_recovery_points_v2" "rp-example" { | ||
limit = 10 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#define values to the variables to be used in terraform file | ||
nutanix_username = "admin" | ||
nutanix_password = "password" | ||
nutanix_endpoint = "10.xx.xx.xx" | ||
nutanix_port = 9440 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#define the type of variables to be used in terraform file | ||
variable "nutanix_username" { | ||
type = string | ||
} | ||
variable "nutanix_password" { | ||
type = string | ||
} | ||
variable "nutanix_endpoint" { | ||
type = string | ||
} | ||
variable "nutanix_port" { | ||
type = string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
terraform { | ||
required_providers { | ||
nutanix = { | ||
source = "nutanix/nutanix" | ||
version = "2.0" | ||
} | ||
} | ||
} | ||
|
||
#definig nutanix configuration | ||
provider "nutanix" { | ||
username = var.nutanix_username | ||
password = var.nutanix_password | ||
endpoint = var.nutanix_endpoint | ||
port = 9440 | ||
insecure = true | ||
} | ||
|
||
|
||
# create RP with Vm Rp | ||
resource "nutanix_recovery_points_v2" "rp-example" { | ||
name = "terraform-test-recovery-point" | ||
expiration_time = "2024-09-17T09:20:42Z" | ||
status = "COMPLETE" | ||
recovery_point_type = "APPLICATION_CONSISTENT" | ||
vm_recovery_points { | ||
vm_ext_id = "<Vm-uuid-1>" | ||
} | ||
} | ||
|
||
|
||
# get VM recovery point info | ||
data "nutanix_vm_recovery_point_info_v2" "example" { | ||
recovery_point_ext_id = nutanix_recovery_points_v2.rp-example.ext_id | ||
ext_id = nutanix_recovery_points_v2.rp-example.vm_recovery_points[0].ext_id | ||
depends_on = [nutanix_recovery_points_v2.rp-example] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#define values to the variables to be used in terraform file | ||
nutanix_username = "admin" | ||
nutanix_password = "password" | ||
nutanix_endpoint = "10.xx.xx.xx" | ||
nutanix_port = 9440 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#define the type of variables to be used in terraform file | ||
variable "nutanix_username" { | ||
type = string | ||
} | ||
variable "nutanix_password" { | ||
type = string | ||
} | ||
variable "nutanix_endpoint" { | ||
type = string | ||
} | ||
variable "nutanix_port" { | ||
type = string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.