Skip to content

azurermDiskPool

Manages a Disk Pool.

!> Note: Azure are officially halting the preview of Azure Disk Pools, and it will not be made generally available. New customers will not be able to register the Microsoft.StoragePool resource provider on their subscription and deploy new Disk Pools. Existing subscriptions registered with Microsoft.StoragePool may continue to deploy and manage disk pools for the time being.

Example 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-network",
    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 azurermSubnetExample = new azurerm.subnet.Subnet(this, "example_2", {
  address_prefixes: ["10.0.0.0/24"],
  delegation: [
    {
      name: "diskspool",
      service_delegation: [
        {
          actions: ["Microsoft.Network/virtualNetworks/read"],
          name: "Microsoft.StoragePool/diskPools",
        },
      ],
    },
  ],
  name: "example-subnet",
  resource_group_name: azurermVirtualNetworkExample.resourceGroupName,
  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 azurermDiskPoolExample = new azurerm.diskPool.DiskPool(
  this,
  "example_3",
  {
    location: azurermResourceGroupExample.location,
    name: "example-disk-pool",
    resource_group_name: azurermResourceGroupExample.name,
    sku_name: "Basic_B1",
    subnet_id: azurermSubnetExample.id,
    zones: ["1"],
  }
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermDiskPoolExample.overrideLogicalId("example");

Arguments Reference

The following arguments are supported:

  • name - (Required) The name of the Disk Pool. Changing this forces a new Disk Pool to be created.

  • resourceGroupName - (Required) The name of the Resource Group where the Disk Pool should exist. Changing this forces a new Disk Pool to be created.

  • location - (Required) The Azure Region where the Disk Pool should exist. Changing this forces a new Disk Pool to be created.

  • zones - (Required) Specifies a list of Availability Zones in which this Disk Pool should be located. Changing this forces a new Disk Pool to be created.

  • skuName - (Required) The SKU of the Disk Pool. Possible values are basicB1, standardS1 and premiumP1. Changing this forces a new Disk Pool to be created.

  • subnetId - (Required) The ID of the Subnet where the Disk Pool should be created. Changing this forces a new Disk Pool to be created.


  • tags - (Optional) A mapping of tags which should be assigned to the Disk Pool.

Attributes Reference

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

  • id - The ID of the Disk Pool.

Timeouts

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

  • create - (Defaults to 30 minutes) Used when creating the Disk Pool.
  • read - (Defaults to 5 minutes) Used when retrieving the Disk Pool.
  • update - (Defaults to 30 minutes) Used when updating the Disk Pool.
  • delete - (Defaults to 30 minutes) Used when deleting the Disk Pool.

Import

Disk Pools can be imported using the resourceId, e.g.

terraform import azurerm_disk_pool.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.StoragePool/diskPools/diskPool1