azurermNetappSnapshot
Manages a NetApp Snapshot.
NetApp Snapshot Usage
/*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 azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
this,
"example",
{
location: "West Europe",
name: "example-resources",
}
);
const azurermVirtualNetworkExample = new azurerm.virtualNetwork.VirtualNetwork(
this,
"example_1",
{
address_space: ["10.0.0.0/16"],
location: azurermResourceGroupExample.location,
name: "example-virtualnetwork",
resource_group_name: azurermResourceGroupExample.name,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermVirtualNetworkExample.overrideLogicalId("example");
const azurermNetappAccountExample = new azurerm.netappAccount.NetappAccount(
this,
"example_2",
{
location: azurermResourceGroupExample.location,
name: "example-netappaccount",
resource_group_name: azurermResourceGroupExample.name,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermNetappAccountExample.overrideLogicalId("example");
const azurermNetappPoolExample = new azurerm.netappPool.NetappPool(
this,
"example_3",
{
account_name: azurermNetappAccountExample.name,
location: azurermResourceGroupExample.location,
name: "example-netapppool",
resource_group_name: azurermResourceGroupExample.name,
service_level: "Premium",
size_in_tb: "4",
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermNetappPoolExample.overrideLogicalId("example");
const azurermNetappVolumeExample = new azurerm.netappVolume.NetappVolume(
this,
"example_4",
{
account_name: azurermNetappAccountExample.name,
location: azurermResourceGroupExample.location,
name: "example-netappvolume",
pool_name: azurermNetappPoolExample.name,
resource_group_name: azurermResourceGroupExample.name,
service_level: "Premium",
storage_quota_in_gb: "100",
subnet_id: "${azurerm_subnet.test.id}",
volume_path: "my-unique-file-path",
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermNetappVolumeExample.overrideLogicalId("example");
const azurermSubnetExample = new azurerm.subnet.Subnet(this, "example_5", {
address_prefixes: ["10.0.2.0/24"],
delegation: [
{
name: "netapp",
service_delegation: [
{
actions: [
"Microsoft.Network/networkinterfaces/*",
"Microsoft.Network/virtualNetworks/subnets/join/action",
],
name: "Microsoft.Netapp/volumes",
},
],
},
],
name: "example-subnet",
resource_group_name: azurermResourceGroupExample.name,
virtual_network_name: azurermVirtualNetworkExample.name,
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermSubnetExample.overrideLogicalId("example");
const azurermNetappSnapshotExample = new azurerm.netappSnapshot.NetappSnapshot(
this,
"example_6",
{
account_name: azurermNetappAccountExample.name,
location: azurermResourceGroupExample.location,
name: "example-netappsnapshot",
pool_name: azurermNetappPoolExample.name,
resource_group_name: azurermResourceGroupExample.name,
volume_name: azurermNetappVolumeExample.name,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermNetappSnapshotExample.overrideLogicalId("example");
Argument Reference
The following arguments are supported:
-
name
- (Required) The name of the NetApp Snapshot. Changing this forces a new resource to be created. -
resourceGroupName
- (Required) The name of the resource group where the NetApp Snapshot should be created. Changing this forces a new resource to be created. -
accountName
- (Required) The name of the NetApp account in which the NetApp Pool should be created. Changing this forces a new resource to be created. -
poolName
- (Required) The name of the NetApp pool in which the NetApp Volume should be created. Changing this forces a new resource to be created. -
volumeName
- (Required) The name of the NetApp volume in which the NetApp Snapshot should be created. Changing this forces a new resource to be created. -
location
- (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Attributes Reference
The following attributes are exported:
id
- The ID of the NetApp Snapshot.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the NetApp Snapshot.update
- (Defaults to 30 minutes) Used when updating the NetApp Snapshot.read
- (Defaults to 5 minutes) Used when retrieving the NetApp Snapshot.delete
- (Defaults to 30 minutes) Used when deleting the NetApp Snapshot.
Import
NetApp Snapshot can be imported using the resourceId
, e.g.