azurerm_netapp_snapshot_policy

Manages a NetApp Snapshot Policy.

NetApp Snapshot Policy Usage

resource "azurerm_resource_group" "example" {
  name     = "resource-group-01"
  location = "East US"
}

resource "azurerm_netapp_account" "example" {
  name                = "netappaccount-01"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
}

resource "azurerm_netapp_snapshot_policy" "example" {
  name                = "snapshotpolicy-01"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  account_name        = azurerm_netapp_account.example.name
  enabled             = true

  hourly_schedule {
    snapshots_to_keep = 4
    minute            = 15
  }

  daily_schedule {
    snapshots_to_keep = 2
    hour              = 20
    minute            = 15
  }

  weekly_schedule {
    snapshots_to_keep = 1
    days_of_week      = ["Monday", "Friday"]
    hour              = 23
    minute            = 0
  }

  monthly_schedule {
    snapshots_to_keep = 1
    days_of_month     = [1, 15, 20, 30]
    hour              = 5
    minute            = 45
  }
}

Argument Reference

The following arguments are supported:


An hourly_schedule block supports the following:


A daily_schedule block supports the following:


A weekly_schedule block supports the following:


A monthly_schedule block supports the following:


Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

Import

NetApp Snapshot Policy can be imported using the resource id, e.g.

terraform import azurerm_netapp_snapshot_policy.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.NetApp/netAppAccounts/account1/snapshotPolicies/snapshotpolicy1