Skip to content

azurermHpcCache

Manages a HPC Cache.

\~> Note: By request of the service team the provider no longer automatically registering the microsoftStorageCache Resource Provider for this resource. To register it you can run azProviderRegisterNamespace 'microsoftStorageCache'.

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: "examplevn",
    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.1.0/24"],
  name: "examplesubnet",
  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 azurermHpcCacheExample = new azurerm.hpcCache.HpcCache(
  this,
  "example_3",
  {
    cache_size_in_gb: 3072,
    location: azurermResourceGroupExample.location,
    name: "examplehpccache",
    resource_group_name: azurermResourceGroupExample.name,
    sku_name: "Standard_2G",
    subnet_id: azurermSubnetExample.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.*/
azurermHpcCacheExample.overrideLogicalId("example");

Argument Reference

The following arguments are supported:

  • name - (Required) The name of the HPC Cache. Changing this forces a new resource to be created.

  • resourceGroupName - (Required) The name of the Resource Group in which to create the HPC Cache. Changing this forces a new resource to be created.

  • location - (Required) Specifies the supported Azure Region where the HPC Cache should be created. Changing this forces a new resource to be created.

  • cacheSizeInGb - (Required) The size of the HPC Cache, in GB. Possible values are 3072, 6144, 12288, 21623, 24576, 43246, 49152 and 86491. Changing this forces a new resource to be created.

-> NOTE: The 21623, 43246 and 86491 sizes are restricted to read only resources.

  • subnetId - (Required) The ID of the Subnet for the HPC Cache. Changing this forces a new resource to be created.

  • skuName - (Required) The SKU of HPC Cache to use. Possible values are (ReadWrite) - standard2G, standard4G standard8G or (ReadOnly) - standardL45G, standardL9G, and standardL16G. Changing this forces a new resource to be created.

-> NOTE: The read-only SKUs have restricted cache sizes. standardL45G must be set to 21623. standardL9G to 43246 and standardL16G to 86491.


  • mtu - (Optional) The IPv4 maximum transmission unit configured for the subnet of the HPC Cache. Possible values range from 576 - 1500. Defaults to 1500.

  • defaultAccessPolicy - (Optional) A defaultAccessPolicy block as defined below.

  • ntpServer - (Optional) The NTP server IP Address or FQDN for the HPC Cache. Defaults to timeWindowsCom.

  • dns - (Optional) A dns block as defined below.

  • directoryActiveDirectory - (Optional) A directoryActiveDirectory block as defined below.

  • directoryFlatFile - (Optional) A directoryFlatFile block as defined below.

  • directoryLdap - (Optional) A directoryLdap block as defined below.

\~> Note: Only one of directoryActiveDirectory, directoryFlatFile and directoryLdap can be set.

  • identity - (Optional) An identity block as defined below. Changing this forces a new resource to be created.

  • keyVaultKeyId - (Optional) The ID of the Key Vault Key which should be used to encrypt the data in this HPC Cache.

  • automaticallyRotateKeyToLatestEnabled - (Optional) Specifies whether the HPC Cache automatically rotates Encryption Key to the latest version.

  • tags - (Optional) A mapping of tags to assign to the HPC Cache.


An accessRule block contains the following:

  • scope - (Required) The scope of this rule. The scope and (potentially) the filter determine which clients match the rule. Possible values are: default, network, host.

\~> Note: Each accessRule should set a unique scope.

  • access - (Required) The access level for this rule. Possible values are: rw, ro, no.

  • filter - (Optional) The filter applied to the scope for this rule. The filter's format depends on its scope: default scope matches all clients and has no filter value; network scope takes a CIDR format; host takes an IP address or fully qualified domain name. If a client does not match any filter rule and there is no default rule, access is denied.

  • suidEnabled - (Optional) Whether SUID is allowed?

  • submountAccessEnabled - (Optional) Whether allow access to subdirectories under the root export?

  • rootSquashEnabled - (Optional) Whether to enable root squash?

  • anonymousUid - (Optional) The anonymous UID used when rootSquashEnabled is true.

  • anonymousGid - (Optional) The anonymous GID used when rootSquashEnabled is true.


A bind block contains the following:

  • dn - (Required) The Bind Distinguished Name (DN) identity to be used in the secure LDAP connection.

  • password - (Required) The Bind password to be used in the secure LDAP connection.


A defaultAccessPolicy block contains the following:

  • accessRule - (Required) One to three accessRule blocks as defined above.

A directoryActiveDirectory block contains the following:

  • dnsPrimaryIp - (Required) The primary DNS IP address used to resolve the Active Directory domain controller's FQDN.

  • domainName - (Required) The fully qualified domain name of the Active Directory domain controller.

  • cacheNetbiosName - (Required) The NetBIOS name to assign to the HPC Cache when it joins the Active Directory domain as a server.

  • domainNetbiosName - (Required) The Active Directory domain's NetBIOS name.

  • username - (Required) The username of the Active Directory domain administrator.

  • password - (Required) The password of the Active Directory domain administrator.

  • dnsSecondaryIp - (Optional) The secondary DNS IP address used to resolve the Active Directory domain controller's FQDN.


A directoryFlatFile block contains the following:

  • groupFileUri - (Required) The URI of the file containing group information (/etc/group file format in Unix-like OS).

  • passwordFileUri - (Required) The URI of the file containing user information (/etc/passwd file format in Unix-like OS).


A directoryLdap block contains the following:

  • server - (Required) The FQDN or IP address of the LDAP server.

  • baseDn - (Required) The base distinguished name (DN) for the LDAP domain.

  • encrypted - (Optional) Whether the LDAP connection should be encrypted?

  • certificateValidationUri - (Optional) The URI of the CA certificate to validate the LDAP secure connection.

  • downloadCertificateAutomatically - (Optional) Whether the certificate should be automatically downloaded. This can be set to true only when certificateValidationUri is provided.

  • bind - (Optional) A bind block as defined above.


A dns block contains the following:

  • servers - (Required) A list of DNS servers for the HPC Cache. At most three IP(s) are allowed to set.

  • searchDomain - (Optional) The DNS search domain for the HPC Cache.


An identity block supports the following:

  • type - (Required) Specifies the type of Managed Service Identity that should be configured on this HPC Cache. Only possible value is userAssigned. Changing this forces a new resource to be created.

  • identityIds - (Required) Specifies a list of User Assigned Managed Identity IDs to be assigned to this HPC Cache. Changing this forces a new resource to be created.

Attributes Reference

The following attributes are exported:

  • id - The id of the HPC Cache.

  • mountAddresses - A list of IP Addresses where the HPC Cache can be mounted.

Timeouts

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

  • create - (Defaults to 60 minutes) Used when creating the HPC Cache.
  • read - (Defaults to 5 minutes) Used when retrieving the HPC Cache.
  • delete - (Defaults to 60 minutes) Used when deleting the HPC Cache.
  • update - (Defaults to 60 minutes) Used when updating the Hpc Cache.

Import

HPC Caches can be imported using the resourceId, e.g.

terraform import azurerm_hpc_cache.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroupName/providers/Microsoft.StorageCache/caches/cacheName