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

Protection rule and Recovery plan(DR Runbook) resources and datasources #216

Merged
merged 29 commits into from
Jan 22, 2021

Conversation

coderGo93
Copy link
Contributor

@coderGo93 coderGo93 commented Dec 4, 2020

Fix for issue #22

Links:
Based on DR Runbook tutorial

Added resources

  • Protection rule
  • Recovery Plan

Added datasource

  • Protection rule
  • Protection rules
  • Recovery plan
  • Recovery plans

Added Tests

  • Resource Protection rule
  • Resource Recovery Plan (passes only for Stage List for now)
  • Datasource Protection rule
  • Datasource Protection rules
  • Datasource Recovery plan
  • Datasource Recovery plans

Example usage of a resource protection rule

resource "nutanix_protection_rule" "protection_rule_test" {
    name        = "test"
    description = "test"
    ordered_availability_zone_list{
        availability_zone_url = "ab788130-0820-4d07-a1b5-b0ba4d3a42asd"
    }

    availability_zone_connectivity_list{
        snapshot_schedule_list{
            recovery_point_objective_secs = 3600
            snapshot_type= "CRASH_CONSISTENT"
            local_snapshot_retention_policy {
                num_snapshots = 1
            }
        }
    }
    category_filter {
        params {
            name = "Environment"
            values = ["Dev"]
        }
    }
}

Example usage of a resource recovery plan

resource "nutanix_recovery_plan" "recovery_plan_test" {
    name        = "%s"
    description = "%s"
    stage_list {
        stage_work{
            recover_entities{
                entity_info_list{
                    categories {
                        name = "Environment"
                        value = "Dev"
                    }
                }
            }
        }
        stage_uuid = "ab788130-0820-4d07-a1b5-b0ba4d3a42asd"
        delay_time_secs = 0
    }
    parameters{}
}

@coderGo93 coderGo93 self-assigned this Dec 4, 2020
@coderGo93 coderGo93 changed the title WIP: Protection rule and Recovery plan(DR Runbook) resources and datasources Protection rule and Recovery plan(DR Runbook) resources and datasources Dec 4, 2020
@marinsalinas marinsalinas changed the base branch from master to v1.2.0-beta January 21, 2021 06:20
@marinsalinas
Copy link
Contributor

@coderGo93 can you resolve the conflicts here?

@marinsalinas marinsalinas merged commit 911c4b6 into v1.2.0-beta Jan 22, 2021
@marinsalinas marinsalinas deleted the dr-runbook-2 branch January 22, 2021 21:48
yannickstruyf3 pushed a commit to yannickstruyf3/terraform-provider-nutanix that referenced this pull request Nov 9, 2021
Protection rule and Recovery plan(DR Runbook) resources and datasources
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