Azure Storage Hpc Cache
This page shows how to write Terraform for Storage Hpc Cache and write them securely.
azurerm_hpc_cache (Terraform)
The Hpc Cache in Storage can be configured in Terraform with the resource name azurerm_hpc_cache
. The following sections describe 7 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "azurerm_hpc_cache" "this" {
cache_size_in_gb = var.cache_size_in_gb
location = var.location
name = var.name
resource_group_name = var.resource_group_name
sku_name = var.sku_name
resource "azurerm_hpc_cache" "hpc_cache" {
name = local.cache_name
resource_group_name = azurerm_resource_group.hpc_cache_rg.name
location = azurerm_resource_group.hpc_cache_rg.location
cache_size_in_gb = local.cache_size
subnet_id = module.network.cloud_cache_subnet_id
resource "azurerm_hpc_cache" "hpc_cache" {
name = local.cache_name
resource_group_name = azurerm_resource_group.hpc_cache_rg.name
location = azurerm_resource_group.hpc_cache_rg.location
cache_size_in_gb = local.cache_size
subnet_id = data.azurerm_subnet.vnet.id
resource "azurerm_hpc_cache" "hpc_cache" {
name = local.cache_name
resource_group_name = azurerm_resource_group.hpc_cache_rg.name
location = azurerm_resource_group.hpc_cache_rg.location
cache_size_in_gb = local.cache_size
subnet_id = module.network.cloud_cache_subnet_id
resource "azurerm_hpc_cache" "hpc_cache" {
name = local.cache_name
resource_group_name = azurerm_resource_group.hpc_cache_rg.name
location = azurerm_resource_group.hpc_cache_rg.location
cache_size_in_gb = local.cache_size
subnet_id = module.network.cloud_cache_subnet_id
resource "azurerm_hpc_cache" "hpc_cache" {
name = local.cache_name
resource_group_name = azurerm_resource_group.hpc_cache_rg.name
location = azurerm_resource_group.hpc_cache_rg.location
cache_size_in_gb = local.cache_size
subnet_id = module.network.cloud_cache_subnet_id
resource "azurerm_hpc_cache" "hpc_cache" {
name = local.cache_name
resource_group_name = azurerm_resource_group.hpc_cache_rg.name
location = azurerm_resource_group.hpc_cache_rg.location
cache_size_in_gb = local.cache_size
subnet_id = module.network.cloud_cache_subnet_id
Parameters
-
cache_size_in_gb
required - number -
id
optional computed - string -
location
required - string -
mount_addresses
optional computed - list of string -
mtu
optional - number -
name
required - string -
ntp_server
optional - string -
resource_group_name
required - string -
root_squash_enabled
optional computed - bool -
sku_name
required - string -
subnet_id
required - string -
tags
optional - map from string to string -
default_access_policy
list block-
access_rule
set block-
access
required - string -
anonymous_gid
optional - number -
anonymous_uid
optional - number -
filter
optional - string -
root_squash_enabled
optional - bool -
scope
required - string -
submount_access_enabled
optional - bool -
suid_enabled
optional - bool
-
-
-
dns
list block-
search_domain
optional - string -
servers
required - list of string
-
-
timeouts
single block
Explanation in Terraform Registry
Manages a HPC Cache.
Note: During the first several months of the GA release, a request must be made to the Azure HPC Cache team to add your subscription to the access list before it can be used to create a cache instance. Fill out this form to request access.
Note: By request of the service team the provider no longer automatically registering the
Microsoft.StorageCache
Resource Provider for this resource. To register it you can runaz provider register --namespace 'Microsoft.StorageCache'
.
Tips: Best Practices for The Other Azure Storage Resources
In addition to the azurerm_storage_account, Azure Storage has the other resources that should be configured for security reasons. Please check some examples of those resources and precautions.
azurerm_storage_account
Ensure to use HTTPS connections
It is better to use HTTPS instead of HTTP, which could be vulnerable to person-in-the-middle attacks.
azurerm_storage_account_network_rules
Ensure to allow Trusted Microsoft Services to bypass
It is better to allow Trusted Microsoft Services to bypass. They are not able to access storage account unless rules are set to allow them explicitly.
Azure Resource Manager Example
Azure Resource Manager code does not have the related resource.
Frequently asked questions
What is Azure Storage Hpc Cache?
Azure Storage Hpc Cache is a resource for Storage of Microsoft Azure. Settings can be wrote in Terraform.
Where can I find the example code for the Azure Storage Hpc Cache?
For Terraform, the niveklabs/azurerm, Azure/Avere and Azure/Avere source code examples are useful. See the Terraform Example section for further details.