Skip to content

azurermVmwareNetappVolumeAttachment

Manages a VMware Private Cloud Netapp File Attachment.

Example Usage

\~> NOTE : For Azure VMware private cloud, normal terraformApply could ignore this note. Please disable correlation request id for continuous operations in one build (like acctest). The continuous operations like update or delete could not be triggered when it shares the same correlationId with its previous operation.

/*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.*/
new azurerm.provider.AzurermProvider(this, "azurerm", {
  disable_correlation_request_id: true,
  features: [{}],
});
const azurermNetappAccountTest = new azurerm.netappAccount.NetappAccount(
  this,
  "test",
  {
    location: "${azurerm_resource_group.test.location}",
    name: "example-NetAppAccount",
    resource_group_name: "${azurerm_resource_group.test.name}",
  }
);
const azurermNetappPoolTest = new azurerm.netappPool.NetappPool(
  this,
  "test_2",
  {
    account_name: azurermNetappAccountTest.name,
    location: "${azurerm_resource_group.test.location}",
    name: "example-NetAppPool",
    resource_group_name: "${azurerm_resource_group.test.name}",
    service_level: "Standard",
    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.*/
azurermNetappPoolTest.overrideLogicalId("test");
const azurermPublicIpTest = new azurerm.publicIp.PublicIp(this, "test_3", {
  allocation_method: "Static",
  location: "${azurerm_resource_group.test.location}",
  name: "example-public-ip",
  resource_group_name: "${azurerm_resource_group.test.name}",
  sku: "Standard",
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermPublicIpTest.overrideLogicalId("test");
new azurerm.resourceGroup.ResourceGroup(this, "example", {
  location: "West Europe",
  name: "example-resources",
});
const azurermVirtualNetworkTest = new azurerm.virtualNetwork.VirtualNetwork(
  this,
  "test_5",
  {
    address_space: ["10.6.0.0/16"],
    location: "${azurerm_resource_group.test.location}",
    name: "example-VirtualNetwork",
    resource_group_name: "${azurerm_resource_group.test.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.*/
azurermVirtualNetworkTest.overrideLogicalId("test");
const azurermVmwarePrivateCloudTest =
  new azurerm.vmwarePrivateCloud.VmwarePrivateCloud(this, "test_6", {
    location: "${azurerm_resource_group.test.location}",
    management_cluster: [
      {
        size: 3,
      },
    ],
    name: "example-PC",
    network_subnet_cidr: "192.168.48.0/22",
    resource_group_name: "${azurerm_resource_group.test.name}",
    sku_name: "av36",
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermVmwarePrivateCloudTest.overrideLogicalId("test");
const azurermSubnetGatewaySubnet = new azurerm.subnet.Subnet(
  this,
  "gatewaySubnet",
  {
    address_prefixes: ["10.6.1.0/24"],
    name: "GatewaySubnet",
    resource_group_name: "${azurerm_resource_group.test.name}",
    virtual_network_name: azurermVirtualNetworkTest.name,
  }
);
const azurermSubnetNetappSubnet = new azurerm.subnet.Subnet(
  this,
  "netappSubnet",
  {
    address_prefixes: ["10.6.2.0/24"],
    delegation: [
      {
        name: "testdelegation",
        service_delegation: [
          {
            actions: [
              "Microsoft.Network/networkinterfaces/*",
              "Microsoft.Network/virtualNetworks/subnets/join/action",
            ],
            name: "Microsoft.Netapp/volumes",
          },
        ],
      },
    ],
    name: "example-Subnet",
    resource_group_name: "${azurerm_resource_group.test.name}",
    virtual_network_name: azurermVirtualNetworkTest.name,
  }
);
const azurermVirtualNetworkGatewayTest =
  new azurerm.virtualNetworkGateway.VirtualNetworkGateway(this, "test_9", {
    ip_configuration: [
      {
        name: "vnetGatewayConfig",
        public_ip_address_id: azurermPublicIpTest.id,
        subnet_id: azurermSubnetGatewaySubnet.id,
      },
    ],
    location: "${azurerm_resource_group.test.location}",
    name: "example-vnet-gateway",
    resource_group_name: "${azurerm_resource_group.test.name}",
    sku: "Standard",
    type: "ExpressRoute",
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermVirtualNetworkGatewayTest.overrideLogicalId("test");
const azurermVmwareClusterTest = new azurerm.vmwareCluster.VmwareCluster(
  this,
  "test_10",
  {
    cluster_node_count: 3,
    name: "example-vm-cluster",
    sku_name: "av36",
    vmware_cloud_id: azurermVmwarePrivateCloudTest.id,
  }
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermVmwareClusterTest.overrideLogicalId("test");
const azurermVmwareExpressRouteAuthorizationTest =
  new azurerm.vmwareExpressRouteAuthorization.VmwareExpressRouteAuthorization(
    this,
    "test_11",
    {
      name: "example-VmwareAuthorization",
      private_cloud_id: azurermVmwarePrivateCloudTest.id,
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermVmwareExpressRouteAuthorizationTest.overrideLogicalId("test");
const azurermNetappVolumeTest = new azurerm.netappVolume.NetappVolume(
  this,
  "test_12",
  {
    account_name: azurermNetappAccountTest.name,
    azure_vmware_data_store_enabled: true,
    export_policy_rule: [
      {
        allowed_clients: ["0.0.0.0/0"],
        protocols_enabled: ["NFSv3"],
        root_access_enabled: true,
        rule_index: 1,
        unix_read_only: false,
        unix_read_write: true,
      },
    ],
    location: "${azurerm_resource_group.test.location}",
    name: "example-NetAppVolume",
    pool_name: azurermNetappPoolTest.name,
    protocols: ["NFSv3"],
    resource_group_name: "${azurerm_resource_group.test.name}",
    service_level: "Standard",
    storage_quota_in_gb: 100,
    subnet_id: azurermSubnetNetappSubnet.id,
    volume_path: "my-unique-file-path-%d",
  }
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermNetappVolumeTest.overrideLogicalId("test");
const azurermVirtualNetworkGatewayConnectionTest =
  new azurerm.virtualNetworkGatewayConnection.VirtualNetworkGatewayConnection(
    this,
    "test_13",
    {
      authorization_key:
        azurermVmwareExpressRouteAuthorizationTest.expressRouteAuthorizationKey,
      express_route_circuit_id: `\${${azurermVmwarePrivateCloudTest.circuit.fqn}[0].express_route_id}`,
      location: "${azurerm_resource_group.test.location}",
      name: "example-vnetgwconn",
      resource_group_name: "${azurerm_resource_group.test.name}",
      type: "ExpressRoute",
      virtual_network_gateway_id: azurermVirtualNetworkGatewayTest.id,
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermVirtualNetworkGatewayConnectionTest.overrideLogicalId("test");
const azurermVmwareNetappVolumeAttachmentTest =
  new azurerm.vmwareNetappVolumeAttachment.VmwareNetappVolumeAttachment(
    this,
    "test_14",
    {
      depends_on: [`\${${azurermVirtualNetworkGatewayConnectionTest.fqn}}`],
      name: "example-vmwareattachment",
      netapp_volume_id: azurermNetappVolumeTest.id,
      vmware_cluster_id: azurermVmwareClusterTest.id,
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermVmwareNetappVolumeAttachmentTest.overrideLogicalId("test");

Arguments Reference

The following arguments are supported:

  • name - (Required) The name which should be used for this VMware Private Cloud Netapp File Volume Attachment. Changing this forces a new VMware Private Cloud Netapp File Volume Attachment to be created.

  • netappVolumeId - (Required) The netapp file volume for this VMware Private Cloud Netapp File Volume Attachment to connect to. Changing this forces a new VMware Private Cloud Netapp File Volume Attachment to be created.

  • vmwareClusterId - (Required) The vmware cluster for this VMware Private Cloud Netapp File Volume Attachment to associated to. Changing this forces a new VMware Private Cloud Netapp File Volume Attachment to be created.

\~> NOTE : please follow the prerequisites mentioned in this article before associating the netapp file volume to the vmware solution hosts.

Timeouts

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

  • create - (Defaults to 30 minutes) Used when creating the VMware Private Cloud Netapp File Volume Attachment.
  • read - (Defaults to 5 minutes) Used when retrieving the VMware Private Cloud Netapp File Volume Attachment.
  • update - (Defaults to 10 hours) Used when updating the VMware Private Cloud Netapp File Volume Attachment.
  • delete - (Defaults to 30 minutes) Used when deleting the VMware Private Cloud Netapp File Volume Attachment.

Import

VMware Private Clouds Netapp File Volume Attachment can be imported using the resourceId, e.g.

terraform import azurerm_vmware_netapp_volume_attachment.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/privateCloud1/clusters/Cluster1/dataStores/datastore1