Skip to content

Data Source: azurermNetappSnapshotPolicy

Uses this data source to access information about an existing NetApp Snapshot Policy.

NetApp Snapshot Policy Usage

import * as cdktf from "cdktf";
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const dataAzurermNetappSnapshotPolicyExample =
  new azurerm.dataAzurermNetappSnapshotPolicy.DataAzurermNetappSnapshotPolicy(
    this,
    "example",
    {
      account_name: "acctestnetappaccount",
      name: "example-snapshot-policy",
      resource_group_name: "acctestRG",
    }
  );
new cdktf.TerraformOutput(this, "daily_schedule", {
  value: dataAzurermNetappSnapshotPolicyExample.dailySchedule,
});
new cdktf.TerraformOutput(this, "enabled", {
  value: dataAzurermNetappSnapshotPolicyExample.enabled,
});
new cdktf.TerraformOutput(this, "hourly_schedule", {
  value: dataAzurermNetappSnapshotPolicyExample.hourlySchedule,
});
new cdktf.TerraformOutput(this, "id", {
  value: dataAzurermNetappSnapshotPolicyExample.id,
});
new cdktf.TerraformOutput(this, "monthly_schedule", {
  value: dataAzurermNetappSnapshotPolicyExample.monthlySchedule,
});
new cdktf.TerraformOutput(this, "name", {
  value: dataAzurermNetappSnapshotPolicyExample.name,
});
new cdktf.TerraformOutput(this, "weekly_schedule", {
  value: dataAzurermNetappSnapshotPolicyExample.weeklySchedule,
});

Argument Reference

The following arguments are supported:

  • name - The name of the NetApp Snapshot Policy.

  • resourceGroupName - The Name of the Resource Group where the NetApp Snapshot Policy exists.

  • accountName - The name of the NetApp account where the NetApp Snapshot Policy exists.

Attributes Reference

The following attributes are exported:

  • id - The ID of the NetApp Snapshot.

  • name - The name of the NetApp Snapshot Policy.

  • resourceGroupName - The name of the resource group where the NetApp Snapshot Policy should be created.

  • location - Specifies the supported Azure location where the resource exists.

  • accountName - The name of the NetApp Account in which the NetApp Snapshot Policy was created.

  • enabled - Defines that the NetApp Snapshot Policy is enabled or not.

  • hourlySchedule - Hourly snapshot schedule.

  • dailySchedule - Daily snapshot schedule.

  • weeklySchedule - Weekly snapshot schedule.

  • monthlySchedule - Monthly snapshot schedule.


An hourlySchedule block exports the following:

  • snapshotsToKeep - How many hourly snapshots to keep.

  • minute - Minute of the hour that the snapshots will be created.


A dailySchedule block exports the following:

  • snapshotsToKeep - How many hourly snapshots to keep.

  • hour - Hour of the day that the snapshots will be created.

  • minute - Minute of the hour that the snapshots will be created.


A weeklySchedule block supports the following:

  • snapshotsToKeep - How many hourly snapshots to keep.

  • daysOfWeek - List of the week days using English names when the snapshots will be created.

  • hour - Hour of the day that the snapshots will be created.

  • minute - Minute of the hour that the snapshots will be created.


A weeklySchedule block supports the following:

  • snapshotsToKeep - How many hourly snapshots to keep.

  • monthlySchedule - List of the days of the month when the snapshots will be created.

  • hour - Hour of the day that the snapshots will be created.

  • minute - Minute of the hour that the snapshots will be created.


Timeouts

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

  • read - (Defaults to 5 minutes) Used when retrieving the NetApp Volume.