We recommend using Azure Native.
Manages a Blob NFSv3 Target within a HPC Cache.
!> Note: The azure.hpc.CacheBlobNfsTarget resource has been deprecated because the service is retiring on 2025-09-30. This resource will be removed in v5.0 of the AzureRM Provider. See https://aka.ms/hpccacheretirement for more information.
Note: By request of the service team the provider no longer automatically registers the
Microsoft.StorageCacheResource Provider for this resource. To register it you can runaz provider register --namespace 'Microsoft.StorageCache'.
Note: This resource depends on the NFSv3 enabled Storage Account, which has some prerequisites need to meet. Please checkout: https://docs.microsoft.com/azure/storage/blobs/network-file-system-protocol-support-how-to?tabs=azure-powershell.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
import * as azuread from "@pulumi/azuread";
import * as std from "@pulumi/std";
const exampleResourceGroup = new azure.core.ResourceGroup("example", {
name: "example-rg",
location: "west europe",
});
const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
name: "example-vnet",
addressSpaces: ["10.0.0.0/16"],
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
});
const exampleSubnet = new azure.network.Subnet("example", {
name: "example-subnet",
resourceGroupName: exampleResourceGroup.name,
virtualNetworkName: exampleVirtualNetwork.name,
addressPrefixes: ["10.0.2.0/24"],
serviceEndpoints: ["Microsoft.Storage"],
});
const example = azuread.getServicePrincipal({
displayName: "HPC Cache Resource Provider",
});
const exampleAccount = new azure.storage.Account("example", {
name: "examplestorageaccount",
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
accountTier: "Standard",
accountKind: "StorageV2",
accountReplicationType: "LRS",
isHnsEnabled: true,
nfsv3Enabled: true,
enableHttpsTrafficOnly: false,
networkRules: {
defaultAction: "Deny",
virtualNetworkSubnetIds: [exampleSubnet.id],
},
});
// Due to https://github.com/hashicorp/terraform-provider-azurerm/issues/2977 and the fact
// that the NFSv3 enabled storage account can't allow public network access - otherwise the NFSv3 protocol will fail,
// we have to use the ARM template to deploy the storage container as a workaround.
// Once the issue above got resolved, we can instead use the azurerm_storage_container resource.
const storage_containers = new azure.core.ResourceGroupTemplateDeployment("storage-containers", {
name: "example-deployment",
resourceGroupName: exampleAccount.resourceGroupName,
deploymentMode: "Incremental",
parametersContent: pulumi.jsonStringify({
location: {
value: exampleAccount.location,
},
storageAccountName: {
value: exampleAccount.name,
},
containerName: {
value: "example-container",
},
}),
templateContent: `{
\\"schema\\": \\"https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#\\",
\\"contentVersion\\": \\"1.0.0.0\\",
\\"parameters\\": {
\\"storageAccountName\\": {
\\"type\\": \\"String\\"
},
\\"containerName\\": {
\\"type\\": \\"String\\"
},
\\"location\\": {
\\"type\\": \\"String\\"
}
},
\\"resources\\": [
{
\\"type\\": \\"Microsoft.Storage/storageAccounts\\",
\\"apiVersion\\": \\"2019-06-01\\",
\\"name\\": \\"[parameters('storageAccountName')]\\",
\\"location\\": \\"[parameters('location')]\\",
\\"sku\\": {
\\"name\\": \\"Standard_LRS\\",
\\"tier\\": \\"Standard\\"
},
\\"kind\\": \\"StorageV2\\",
\\"properties\\": {
\\"accessTier\\": \\"Hot\\"
},
\\"resources\\": [
{
\\"type\\": \\"blobServices/containers\\",
\\"apiVersion\\": \\"2019-06-01\\",
\\"name\\": \\"[concat('default/', parameters('containerName'))]\\",
\\"dependsOn\\": [
\\"[parameters('storageAccountName')]\\"
]
}
]
}
],
\\"outputs\\": {
\\"id\\": {
\\"type\\": \\"String\\",
\\"value\\": \\"[resourceId('Microsoft.Storage/storageAccounts/blobServices/containers', parameters('storageAccountName'), 'default', parameters('containerName'))]\\"
}
}
}
`,
});
const exampleStorageAccountContrib = new azure.authorization.Assignment("example_storage_account_contrib", {
scope: exampleAccount.id,
roleDefinitionName: "Storage Account Contributor",
principalId: example.then(example => example.objectId),
});
const exampleStorageBlobDataContrib = new azure.authorization.Assignment("example_storage_blob_data_contrib", {
scope: exampleAccount.id,
roleDefinitionName: "Storage Blob Data Contributor",
principalId: example.then(example => example.objectId),
});
const exampleCache = new azure.hpc.Cache("example", {
name: "example-hpc-cache",
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
cacheSizeInGb: 3072,
subnetId: exampleSubnet.id,
skuName: "Standard_2G",
});
const exampleCacheBlobNfsTarget = new azure.hpc.CacheBlobNfsTarget("example", {
name: "example-hpc-target",
resourceGroupName: exampleResourceGroup.name,
cacheName: exampleCache.name,
storageContainerId: std.jsondecodeOutput({
input: storage_containers.outputContent,
}).apply(invoke => invoke.result?.id?.value),
namespacePath: "/p1",
usageModel: "READ_HEAVY_INFREQ",
});
import pulumi
import json
import pulumi_azure as azure
import pulumi_azuread as azuread
import pulumi_std as std
example_resource_group = azure.core.ResourceGroup("example",
name="example-rg",
location="west europe")
example_virtual_network = azure.network.VirtualNetwork("example",
name="example-vnet",
address_spaces=["10.0.0.0/16"],
location=example_resource_group.location,
resource_group_name=example_resource_group.name)
example_subnet = azure.network.Subnet("example",
name="example-subnet",
resource_group_name=example_resource_group.name,
virtual_network_name=example_virtual_network.name,
address_prefixes=["10.0.2.0/24"],
service_endpoints=["Microsoft.Storage"])
example = azuread.get_service_principal(display_name="HPC Cache Resource Provider")
example_account = azure.storage.Account("example",
name="examplestorageaccount",
resource_group_name=example_resource_group.name,
location=example_resource_group.location,
account_tier="Standard",
account_kind="StorageV2",
account_replication_type="LRS",
is_hns_enabled=True,
nfsv3_enabled=True,
enable_https_traffic_only=False,
network_rules={
"default_action": "Deny",
"virtual_network_subnet_ids": [example_subnet.id],
})
# Due to https://github.com/hashicorp/terraform-provider-azurerm/issues/2977 and the fact
# that the NFSv3 enabled storage account can't allow public network access - otherwise the NFSv3 protocol will fail,
# we have to use the ARM template to deploy the storage container as a workaround.
# Once the issue above got resolved, we can instead use the azurerm_storage_container resource.
storage_containers = azure.core.ResourceGroupTemplateDeployment("storage-containers",
name="example-deployment",
resource_group_name=example_account.resource_group_name,
deployment_mode="Incremental",
parameters_content=pulumi.Output.json_dumps({
"location": {
"value": example_account.location,
},
"storageAccountName": {
"value": example_account.name,
},
"containerName": {
"value": "example-container",
},
}),
template_content="""{
\"$schema\": \"https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#\",
\"contentVersion\": \"1.0.0.0\",
\"parameters\": {
\"storageAccountName\": {
\"type\": \"String\"
},
\"containerName\": {
\"type\": \"String\"
},
\"location\": {
\"type\": \"String\"
}
},
\"resources\": [
{
\"type\": \"Microsoft.Storage/storageAccounts\",
\"apiVersion\": \"2019-06-01\",
\"name\": \"[parameters('storageAccountName')]\",
\"location\": \"[parameters('location')]\",
\"sku\": {
\"name\": \"Standard_LRS\",
\"tier\": \"Standard\"
},
\"kind\": \"StorageV2\",
\"properties\": {
\"accessTier\": \"Hot\"
},
\"resources\": [
{
\"type\": \"blobServices/containers\",
\"apiVersion\": \"2019-06-01\",
\"name\": \"[concat('default/', parameters('containerName'))]\",
\"dependsOn\": [
\"[parameters('storageAccountName')]\"
]
}
]
}
],
\"outputs\": {
\"id\": {
\"type\": \"String\",
\"value\": \"[resourceId('Microsoft.Storage/storageAccounts/blobServices/containers', parameters('storageAccountName'), 'default', parameters('containerName'))]\"
}
}
}
""")
example_storage_account_contrib = azure.authorization.Assignment("example_storage_account_contrib",
scope=example_account.id,
role_definition_name="Storage Account Contributor",
principal_id=example.object_id)
example_storage_blob_data_contrib = azure.authorization.Assignment("example_storage_blob_data_contrib",
scope=example_account.id,
role_definition_name="Storage Blob Data Contributor",
principal_id=example.object_id)
example_cache = azure.hpc.Cache("example",
name="example-hpc-cache",
resource_group_name=example_resource_group.name,
location=example_resource_group.location,
cache_size_in_gb=3072,
subnet_id=example_subnet.id,
sku_name="Standard_2G")
example_cache_blob_nfs_target = azure.hpc.CacheBlobNfsTarget("example",
name="example-hpc-target",
resource_group_name=example_resource_group.name,
cache_name=example_cache.name,
storage_container_id=std.jsondecode_output(input=storage_containers.output_content).apply(lambda invoke: invoke.result["id"]["value"]),
namespace_path="/p1",
usage_model="READ_HEAVY_INFREQ")
package main
import (
"encoding/json"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/hpc"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
"github.com/pulumi/pulumi-azuread/sdk/v6/go/azuread"
"github.com/pulumi/pulumi-std/sdk/go/std"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("example-rg"),
Location: pulumi.String("west europe"),
})
if err != nil {
return err
}
exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
Name: pulumi.String("example-vnet"),
AddressSpaces: pulumi.StringArray{
pulumi.String("10.0.0.0/16"),
},
Location: exampleResourceGroup.Location,
ResourceGroupName: exampleResourceGroup.Name,
})
if err != nil {
return err
}
exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
Name: pulumi.String("example-subnet"),
ResourceGroupName: exampleResourceGroup.Name,
VirtualNetworkName: exampleVirtualNetwork.Name,
AddressPrefixes: pulumi.StringArray{
pulumi.String("10.0.2.0/24"),
},
ServiceEndpoints: pulumi.StringArray{
pulumi.String("Microsoft.Storage"),
},
})
if err != nil {
return err
}
example, err := azuread.LookupServicePrincipal(ctx, &azuread.LookupServicePrincipalArgs{
DisplayName: pulumi.StringRef("HPC Cache Resource Provider"),
}, nil);
if err != nil {
return err
}
exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
Name: pulumi.String("examplestorageaccount"),
ResourceGroupName: exampleResourceGroup.Name,
Location: exampleResourceGroup.Location,
AccountTier: pulumi.String("Standard"),
AccountKind: pulumi.String("StorageV2"),
AccountReplicationType: pulumi.String("LRS"),
IsHnsEnabled: pulumi.Bool(true),
Nfsv3Enabled: pulumi.Bool(true),
EnableHttpsTrafficOnly: false,
NetworkRules: &storage.AccountNetworkRulesTypeArgs{
DefaultAction: pulumi.String("Deny"),
VirtualNetworkSubnetIds: pulumi.StringArray{
exampleSubnet.ID(),
},
},
})
if err != nil {
return err
}
// Due to https://github.com/hashicorp/terraform-provider-azurerm/issues/2977 and the fact
// that the NFSv3 enabled storage account can't allow public network access - otherwise the NFSv3 protocol will fail,
// we have to use the ARM template to deploy the storage container as a workaround.
// Once the issue above got resolved, we can instead use the azurerm_storage_container resource.
storage_containers, err := core.NewResourceGroupTemplateDeployment(ctx, "storage-containers", &core.ResourceGroupTemplateDeploymentArgs{
Name: pulumi.String("example-deployment"),
ResourceGroupName: exampleAccount.ResourceGroupName,
DeploymentMode: pulumi.String("Incremental"),
ParametersContent: pulumi.All(exampleAccount.Location,exampleAccount.Name).ApplyT(func(_args []interface{}) (string, error) {
location := _args[0].(string)
name := _args[1].(string)
var _zero string
tmpJSON0, err := json.Marshal(map[string]interface{}{
"location": map[string]interface{}{
"value": location,
},
"storageAccountName": map[string]interface{}{
"value": name,
},
"containerName": map[string]interface{}{
"value": "example-container",
},
})
if err != nil {
return _zero, err
}
json0 := string(tmpJSON0)
return json0, nil
}).(pulumi.StringOutput),
TemplateContent: pulumi.String(`{
\"$schema\": \"https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#\",
\"contentVersion\": \"1.0.0.0\",
\"parameters\": {
\"storageAccountName\": {
\"type\": \"String\"
},
\"containerName\": {
\"type\": \"String\"
},
\"location\": {
\"type\": \"String\"
}
},
\"resources\": [
{
\"type\": \"Microsoft.Storage/storageAccounts\",
\"apiVersion\": \"2019-06-01\",
\"name\": \"[parameters('storageAccountName')]\",
\"location\": \"[parameters('location')]\",
\"sku\": {
\"name\": \"Standard_LRS\",
\"tier\": \"Standard\"
},
\"kind\": \"StorageV2\",
\"properties\": {
\"accessTier\": \"Hot\"
},
\"resources\": [
{
\"type\": \"blobServices/containers\",
\"apiVersion\": \"2019-06-01\",
\"name\": \"[concat('default/', parameters('containerName'))]\",
\"dependsOn\": [
\"[parameters('storageAccountName')]\"
]
}
]
}
],
\"outputs\": {
\"id\": {
\"type\": \"String\",
\"value\": \"[resourceId('Microsoft.Storage/storageAccounts/blobServices/containers', parameters('storageAccountName'), 'default', parameters('containerName'))]\"
}
}
}
`),
})
if err != nil {
return err
}
_, err = authorization.NewAssignment(ctx, "example_storage_account_contrib", &authorization.AssignmentArgs{
Scope: exampleAccount.ID(),
RoleDefinitionName: pulumi.String("Storage Account Contributor"),
PrincipalId: pulumi.String(example.ObjectId),
})
if err != nil {
return err
}
_, err = authorization.NewAssignment(ctx, "example_storage_blob_data_contrib", &authorization.AssignmentArgs{
Scope: exampleAccount.ID(),
RoleDefinitionName: pulumi.String("Storage Blob Data Contributor"),
PrincipalId: pulumi.String(example.ObjectId),
})
if err != nil {
return err
}
exampleCache, err := hpc.NewCache(ctx, "example", &hpc.CacheArgs{
Name: pulumi.String("example-hpc-cache"),
ResourceGroupName: exampleResourceGroup.Name,
Location: exampleResourceGroup.Location,
CacheSizeInGb: pulumi.Int(3072),
SubnetId: exampleSubnet.ID(),
SkuName: pulumi.String("Standard_2G"),
})
if err != nil {
return err
}
_, err = hpc.NewCacheBlobNfsTarget(ctx, "example", &hpc.CacheBlobNfsTargetArgs{
Name: pulumi.String("example-hpc-target"),
ResourceGroupName: exampleResourceGroup.Name,
CacheName: exampleCache.Name,
StorageContainerId: pulumi.String(std.JsondecodeOutput(ctx, std.JsondecodeOutputArgs{
Input: storage_containers.OutputContent,
}, nil).ApplyT(func(invoke std.JsondecodeResult) (*interface{}, error) {
return invoke.Result.Id.Value, nil
}).(pulumi.Interface{}PtrOutput)),
NamespacePath: pulumi.String("/p1"),
UsageModel: pulumi.String("READ_HEAVY_INFREQ"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Azure = Pulumi.Azure;
using AzureAD = Pulumi.AzureAD;
using Std = Pulumi.Std;
return await Deployment.RunAsync(() =>
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("example", new()
{
Name = "example-rg",
Location = "west europe",
});
var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("example", new()
{
Name = "example-vnet",
AddressSpaces = new[]
{
"10.0.0.0/16",
},
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
});
var exampleSubnet = new Azure.Network.Subnet("example", new()
{
Name = "example-subnet",
ResourceGroupName = exampleResourceGroup.Name,
VirtualNetworkName = exampleVirtualNetwork.Name,
AddressPrefixes = new[]
{
"10.0.2.0/24",
},
ServiceEndpoints = new[]
{
"Microsoft.Storage",
},
});
var example = AzureAD.GetServicePrincipal.Invoke(new()
{
DisplayName = "HPC Cache Resource Provider",
});
var exampleAccount = new Azure.Storage.Account("example", new()
{
Name = "examplestorageaccount",
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
AccountTier = "Standard",
AccountKind = "StorageV2",
AccountReplicationType = "LRS",
IsHnsEnabled = true,
Nfsv3Enabled = true,
EnableHttpsTrafficOnly = false,
NetworkRules = new Azure.Storage.Inputs.AccountNetworkRulesArgs
{
DefaultAction = "Deny",
VirtualNetworkSubnetIds = new[]
{
exampleSubnet.Id,
},
},
});
// Due to https://github.com/hashicorp/terraform-provider-azurerm/issues/2977 and the fact
// that the NFSv3 enabled storage account can't allow public network access - otherwise the NFSv3 protocol will fail,
// we have to use the ARM template to deploy the storage container as a workaround.
// Once the issue above got resolved, we can instead use the azurerm_storage_container resource.
var storage_containers = new Azure.Core.ResourceGroupTemplateDeployment("storage-containers", new()
{
Name = "example-deployment",
ResourceGroupName = exampleAccount.ResourceGroupName,
DeploymentMode = "Incremental",
ParametersContent = Output.JsonSerialize(Output.Create(new Dictionary<string, object?>
{
["location"] = new Dictionary<string, object?>
{
["value"] = exampleAccount.Location,
},
["storageAccountName"] = new Dictionary<string, object?>
{
["value"] = exampleAccount.Name,
},
["containerName"] = new Dictionary<string, object?>
{
["value"] = "example-container",
},
})),
TemplateContent = @"{
\""$schema\"": \""https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#\"",
\""contentVersion\"": \""1.0.0.0\"",
\""parameters\"": {
\""storageAccountName\"": {
\""type\"": \""String\""
},
\""containerName\"": {
\""type\"": \""String\""
},
\""location\"": {
\""type\"": \""String\""
}
},
\""resources\"": [
{
\""type\"": \""Microsoft.Storage/storageAccounts\"",
\""apiVersion\"": \""2019-06-01\"",
\""name\"": \""[parameters('storageAccountName')]\"",
\""location\"": \""[parameters('location')]\"",
\""sku\"": {
\""name\"": \""Standard_LRS\"",
\""tier\"": \""Standard\""
},
\""kind\"": \""StorageV2\"",
\""properties\"": {
\""accessTier\"": \""Hot\""
},
\""resources\"": [
{
\""type\"": \""blobServices/containers\"",
\""apiVersion\"": \""2019-06-01\"",
\""name\"": \""[concat('default/', parameters('containerName'))]\"",
\""dependsOn\"": [
\""[parameters('storageAccountName')]\""
]
}
]
}
],
\""outputs\"": {
\""id\"": {
\""type\"": \""String\"",
\""value\"": \""[resourceId('Microsoft.Storage/storageAccounts/blobServices/containers', parameters('storageAccountName'), 'default', parameters('containerName'))]\""
}
}
}
",
});
var exampleStorageAccountContrib = new Azure.Authorization.Assignment("example_storage_account_contrib", new()
{
Scope = exampleAccount.Id,
RoleDefinitionName = "Storage Account Contributor",
PrincipalId = example.Apply(getServicePrincipalResult => getServicePrincipalResult.ObjectId),
});
var exampleStorageBlobDataContrib = new Azure.Authorization.Assignment("example_storage_blob_data_contrib", new()
{
Scope = exampleAccount.Id,
RoleDefinitionName = "Storage Blob Data Contributor",
PrincipalId = example.Apply(getServicePrincipalResult => getServicePrincipalResult.ObjectId),
});
var exampleCache = new Azure.Hpc.Cache("example", new()
{
Name = "example-hpc-cache",
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
CacheSizeInGb = 3072,
SubnetId = exampleSubnet.Id,
SkuName = "Standard_2G",
});
var exampleCacheBlobNfsTarget = new Azure.Hpc.CacheBlobNfsTarget("example", new()
{
Name = "example-hpc-target",
ResourceGroupName = exampleResourceGroup.Name,
CacheName = exampleCache.Name,
StorageContainerId = Std.Jsondecode.Invoke(new()
{
Input = storage_containers.OutputContent,
}).Apply(invoke => invoke.Result?.Id?.Value),
NamespacePath = "/p1",
UsageModel = "READ_HEAVY_INFREQ",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.network.VirtualNetwork;
import com.pulumi.azure.network.VirtualNetworkArgs;
import com.pulumi.azure.network.Subnet;
import com.pulumi.azure.network.SubnetArgs;
import com.pulumi.azuread.AzureadFunctions;
import com.pulumi.azuread.inputs.GetServicePrincipalArgs;
import com.pulumi.azure.storage.Account;
import com.pulumi.azure.storage.AccountArgs;
import com.pulumi.azure.storage.inputs.AccountNetworkRulesArgs;
import com.pulumi.azure.core.ResourceGroupTemplateDeployment;
import com.pulumi.azure.core.ResourceGroupTemplateDeploymentArgs;
import com.pulumi.azure.authorization.Assignment;
import com.pulumi.azure.authorization.AssignmentArgs;
import com.pulumi.azure.hpc.Cache;
import com.pulumi.azure.hpc.CacheArgs;
import com.pulumi.azure.hpc.CacheBlobNfsTarget;
import com.pulumi.azure.hpc.CacheBlobNfsTargetArgs;
import com.pulumi.std.StdFunctions;
import com.pulumi.std.inputs.JsondecodeArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.name("example-rg")
.location("west europe")
.build());
var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
.name("example-vnet")
.addressSpaces("10.0.0.0/16")
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.build());
var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
.name("example-subnet")
.resourceGroupName(exampleResourceGroup.name())
.virtualNetworkName(exampleVirtualNetwork.name())
.addressPrefixes("10.0.2.0/24")
.serviceEndpoints("Microsoft.Storage")
.build());
final var example = AzureadFunctions.getServicePrincipal(GetServicePrincipalArgs.builder()
.displayName("HPC Cache Resource Provider")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.name("examplestorageaccount")
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.accountTier("Standard")
.accountKind("StorageV2")
.accountReplicationType("LRS")
.isHnsEnabled(true)
.nfsv3Enabled(true)
.enableHttpsTrafficOnly(false)
.networkRules(AccountNetworkRulesArgs.builder()
.defaultAction("Deny")
.virtualNetworkSubnetIds(exampleSubnet.id())
.build())
.build());
// Due to https://github.com/hashicorp/terraform-provider-azurerm/issues/2977 and the fact
// that the NFSv3 enabled storage account can't allow public network access - otherwise the NFSv3 protocol will fail,
// we have to use the ARM template to deploy the storage container as a workaround.
// Once the issue above got resolved, we can instead use the azurerm_storage_container resource.
var storage_containers = new ResourceGroupTemplateDeployment("storage-containers", ResourceGroupTemplateDeploymentArgs.builder()
.name("example-deployment")
.resourceGroupName(exampleAccount.resourceGroupName())
.deploymentMode("Incremental")
.parametersContent(Output.tuple(exampleAccount.location(), exampleAccount.name()).applyValue(values -> {
var location = values.t1;
var name = values.t2;
return serializeJson(
jsonObject(
jsonProperty("location", jsonObject(
jsonProperty("value", location)
)),
jsonProperty("storageAccountName", jsonObject(
jsonProperty("value", name)
)),
jsonProperty("containerName", jsonObject(
jsonProperty("value", "example-container")
))
));
}))
.templateContent("""
{
\"$schema\": \"https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#\",
\"contentVersion\": \"1.0.0.0\",
\"parameters\": {
\"storageAccountName\": {
\"type\": \"String\"
},
\"containerName\": {
\"type\": \"String\"
},
\"location\": {
\"type\": \"String\"
}
},
\"resources\": [
{
\"type\": \"Microsoft.Storage/storageAccounts\",
\"apiVersion\": \"2019-06-01\",
\"name\": \"[parameters('storageAccountName')]\",
\"location\": \"[parameters('location')]\",
\"sku\": {
\"name\": \"Standard_LRS\",
\"tier\": \"Standard\"
},
\"kind\": \"StorageV2\",
\"properties\": {
\"accessTier\": \"Hot\"
},
\"resources\": [
{
\"type\": \"blobServices/containers\",
\"apiVersion\": \"2019-06-01\",
\"name\": \"[concat('default/', parameters('containerName'))]\",
\"dependsOn\": [
\"[parameters('storageAccountName')]\"
]
}
]
}
],
\"outputs\": {
\"id\": {
\"type\": \"String\",
\"value\": \"[resourceId('Microsoft.Storage/storageAccounts/blobServices/containers', parameters('storageAccountName'), 'default', parameters('containerName'))]\"
}
}
}
""")
.build());
var exampleStorageAccountContrib = new Assignment("exampleStorageAccountContrib", AssignmentArgs.builder()
.scope(exampleAccount.id())
.roleDefinitionName("Storage Account Contributor")
.principalId(example.objectId())
.build());
var exampleStorageBlobDataContrib = new Assignment("exampleStorageBlobDataContrib", AssignmentArgs.builder()
.scope(exampleAccount.id())
.roleDefinitionName("Storage Blob Data Contributor")
.principalId(example.objectId())
.build());
var exampleCache = new Cache("exampleCache", CacheArgs.builder()
.name("example-hpc-cache")
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.cacheSizeInGb(3072)
.subnetId(exampleSubnet.id())
.skuName("Standard_2G")
.build());
var exampleCacheBlobNfsTarget = new CacheBlobNfsTarget("exampleCacheBlobNfsTarget", CacheBlobNfsTargetArgs.builder()
.name("example-hpc-target")
.resourceGroupName(exampleResourceGroup.name())
.cacheName(exampleCache.name())
.storageContainerId(StdFunctions.jsondecode(JsondecodeArgs.builder()
.input(storage_containers.outputContent())
.build()).applyValue(_invoke -> _invoke.result().id().value()))
.namespacePath("/p1")
.usageModel("READ_HEAVY_INFREQ")
.build());
}
}
resources:
exampleResourceGroup:
type: azure:core:ResourceGroup
name: example
properties:
name: example-rg
location: west europe
exampleVirtualNetwork:
type: azure:network:VirtualNetwork
name: example
properties:
name: example-vnet
addressSpaces:
- 10.0.0.0/16
location: ${exampleResourceGroup.location}
resourceGroupName: ${exampleResourceGroup.name}
exampleSubnet:
type: azure:network:Subnet
name: example
properties:
name: example-subnet
resourceGroupName: ${exampleResourceGroup.name}
virtualNetworkName: ${exampleVirtualNetwork.name}
addressPrefixes:
- 10.0.2.0/24
serviceEndpoints:
- Microsoft.Storage
exampleAccount:
type: azure:storage:Account
name: example
properties:
name: examplestorageaccount
resourceGroupName: ${exampleResourceGroup.name}
location: ${exampleResourceGroup.location}
accountTier: Standard
accountKind: StorageV2
accountReplicationType: LRS
isHnsEnabled: true
nfsv3Enabled: true
enableHttpsTrafficOnly: false
networkRules:
defaultAction: Deny
virtualNetworkSubnetIds:
- ${exampleSubnet.id}
# Due to https://github.com/hashicorp/terraform-provider-azurerm/issues/2977 and the fact
# that the NFSv3 enabled storage account can't allow public network access - otherwise the NFSv3 protocol will fail,
# we have to use the ARM template to deploy the storage container as a workaround.
# Once the issue above got resolved, we can instead use the azurerm_storage_container resource.
storage-containers:
type: azure:core:ResourceGroupTemplateDeployment
properties:
name: example-deployment
resourceGroupName: ${exampleAccount.resourceGroupName}
deploymentMode: Incremental
parametersContent:
fn::toJSON:
location:
value: ${exampleAccount.location}
storageAccountName:
value: ${exampleAccount.name}
containerName:
value: example-container
templateContent: |
{
\"$schema\": \"https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#\",
\"contentVersion\": \"1.0.0.0\",
\"parameters\": {
\"storageAccountName\": {
\"type\": \"String\"
},
\"containerName\": {
\"type\": \"String\"
},
\"location\": {
\"type\": \"String\"
}
},
\"resources\": [
{
\"type\": \"Microsoft.Storage/storageAccounts\",
\"apiVersion\": \"2019-06-01\",
\"name\": \"[parameters('storageAccountName')]\",
\"location\": \"[parameters('location')]\",
\"sku\": {
\"name\": \"Standard_LRS\",
\"tier\": \"Standard\"
},
\"kind\": \"StorageV2\",
\"properties\": {
\"accessTier\": \"Hot\"
},
\"resources\": [
{
\"type\": \"blobServices/containers\",
\"apiVersion\": \"2019-06-01\",
\"name\": \"[concat('default/', parameters('containerName'))]\",
\"dependsOn\": [
\"[parameters('storageAccountName')]\"
]
}
]
}
],
\"outputs\": {
\"id\": {
\"type\": \"String\",
\"value\": \"[resourceId('Microsoft.Storage/storageAccounts/blobServices/containers', parameters('storageAccountName'), 'default', parameters('containerName'))]\"
}
}
}
exampleStorageAccountContrib:
type: azure:authorization:Assignment
name: example_storage_account_contrib
properties:
scope: ${exampleAccount.id}
roleDefinitionName: Storage Account Contributor
principalId: ${example.objectId}
exampleStorageBlobDataContrib:
type: azure:authorization:Assignment
name: example_storage_blob_data_contrib
properties:
scope: ${exampleAccount.id}
roleDefinitionName: Storage Blob Data Contributor
principalId: ${example.objectId}
exampleCache:
type: azure:hpc:Cache
name: example
properties:
name: example-hpc-cache
resourceGroupName: ${exampleResourceGroup.name}
location: ${exampleResourceGroup.location}
cacheSizeInGb: 3072
subnetId: ${exampleSubnet.id}
skuName: Standard_2G
exampleCacheBlobNfsTarget:
type: azure:hpc:CacheBlobNfsTarget
name: example
properties:
name: example-hpc-target
resourceGroupName: ${exampleResourceGroup.name}
cacheName: ${exampleCache.name}
storageContainerId:
fn::invoke:
function: std:jsondecode
arguments:
input: ${["storage-containers"].outputContent}
return: result.id.value
namespacePath: /p1
usageModel: READ_HEAVY_INFREQ
variables:
example:
fn::invoke:
function: azuread:getServicePrincipal
arguments:
displayName: HPC Cache Resource Provider
API Providers
This resource uses the following Azure API Providers:
Microsoft.StorageCache- 2023-05-01
Create CacheBlobNfsTarget Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CacheBlobNfsTarget(name: string, args: CacheBlobNfsTargetArgs, opts?: CustomResourceOptions);@overload
def CacheBlobNfsTarget(resource_name: str,
args: CacheBlobNfsTargetArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CacheBlobNfsTarget(resource_name: str,
opts: Optional[ResourceOptions] = None,
cache_name: Optional[str] = None,
namespace_path: Optional[str] = None,
resource_group_name: Optional[str] = None,
storage_container_id: Optional[str] = None,
usage_model: Optional[str] = None,
access_policy_name: Optional[str] = None,
name: Optional[str] = None,
verification_timer_in_seconds: Optional[int] = None,
write_back_timer_in_seconds: Optional[int] = None)func NewCacheBlobNfsTarget(ctx *Context, name string, args CacheBlobNfsTargetArgs, opts ...ResourceOption) (*CacheBlobNfsTarget, error)public CacheBlobNfsTarget(string name, CacheBlobNfsTargetArgs args, CustomResourceOptions? opts = null)
public CacheBlobNfsTarget(String name, CacheBlobNfsTargetArgs args)
public CacheBlobNfsTarget(String name, CacheBlobNfsTargetArgs args, CustomResourceOptions options)
type: azure:hpc:CacheBlobNfsTarget
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args CacheBlobNfsTargetArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args CacheBlobNfsTargetArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args CacheBlobNfsTargetArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CacheBlobNfsTargetArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CacheBlobNfsTargetArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var cacheBlobNfsTargetResource = new Azure.Hpc.CacheBlobNfsTarget("cacheBlobNfsTargetResource", new()
{
CacheName = "string",
NamespacePath = "string",
ResourceGroupName = "string",
StorageContainerId = "string",
UsageModel = "string",
AccessPolicyName = "string",
Name = "string",
VerificationTimerInSeconds = 0,
WriteBackTimerInSeconds = 0,
});
example, err := hpc.NewCacheBlobNfsTarget(ctx, "cacheBlobNfsTargetResource", &hpc.CacheBlobNfsTargetArgs{
CacheName: pulumi.String("string"),
NamespacePath: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
StorageContainerId: pulumi.String("string"),
UsageModel: pulumi.String("string"),
AccessPolicyName: pulumi.String("string"),
Name: pulumi.String("string"),
VerificationTimerInSeconds: pulumi.Int(0),
WriteBackTimerInSeconds: pulumi.Int(0),
})
var cacheBlobNfsTargetResource = new CacheBlobNfsTarget("cacheBlobNfsTargetResource", CacheBlobNfsTargetArgs.builder()
.cacheName("string")
.namespacePath("string")
.resourceGroupName("string")
.storageContainerId("string")
.usageModel("string")
.accessPolicyName("string")
.name("string")
.verificationTimerInSeconds(0)
.writeBackTimerInSeconds(0)
.build());
cache_blob_nfs_target_resource = azure.hpc.CacheBlobNfsTarget("cacheBlobNfsTargetResource",
cache_name="string",
namespace_path="string",
resource_group_name="string",
storage_container_id="string",
usage_model="string",
access_policy_name="string",
name="string",
verification_timer_in_seconds=0,
write_back_timer_in_seconds=0)
const cacheBlobNfsTargetResource = new azure.hpc.CacheBlobNfsTarget("cacheBlobNfsTargetResource", {
cacheName: "string",
namespacePath: "string",
resourceGroupName: "string",
storageContainerId: "string",
usageModel: "string",
accessPolicyName: "string",
name: "string",
verificationTimerInSeconds: 0,
writeBackTimerInSeconds: 0,
});
type: azure:hpc:CacheBlobNfsTarget
properties:
accessPolicyName: string
cacheName: string
name: string
namespacePath: string
resourceGroupName: string
storageContainerId: string
usageModel: string
verificationTimerInSeconds: 0
writeBackTimerInSeconds: 0
CacheBlobNfsTarget Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The CacheBlobNfsTarget resource accepts the following input properties:
- Cache
Name string - The name of the HPC Cache, which the HPC Cache Blob NFS Target will be added to. Changing this forces a new HPC Cache Blob NFS Target to be created.
- Namespace
Path string - The client-facing file path of the HPC Cache Blob NFS Target.
- Resource
Group stringName - The name of the Resource Group where the HPC Cache Blob NFS Target should exist. Changing this forces a new HPC Cache Blob NFS Target to be created.
- Storage
Container stringId The Resource Manager ID of the Storage Container used as the HPC Cache Blob NFS Target. Changing this forces a new resource to be created.
Note: This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the
azure.storage.ContainerData Source/Resource asresource_manager_id.- Usage
Model string - The type of usage of the HPC Cache Blob NFS Target. Possible values are:
READ_HEAVY_INFREQ,READ_HEAVY_CHECK_180,READ_ONLY,READ_WRITE,WRITE_WORKLOAD_15,WRITE_AROUND,WRITE_WORKLOAD_CHECK_30,WRITE_WORKLOAD_CHECK_60andWRITE_WORKLOAD_CLOUDWS. - Access
Policy stringName - The name of the access policy applied to this target. Defaults to
default. - Name string
- The name which should be used for this HPC Cache Blob NFS Target. Changing this forces a new HPC Cache Blob NFS Target to be created.
- Verification
Timer intIn Seconds - The amount of time the cache waits before it checks the back-end storage for file updates. Possible values are between
1and31536000. - Write
Back intTimer In Seconds - The amount of time the cache waits after the last file change before it copies the changed file to back-end storage. Possible values are between
1and31536000.
- Cache
Name string - The name of the HPC Cache, which the HPC Cache Blob NFS Target will be added to. Changing this forces a new HPC Cache Blob NFS Target to be created.
- Namespace
Path string - The client-facing file path of the HPC Cache Blob NFS Target.
- Resource
Group stringName - The name of the Resource Group where the HPC Cache Blob NFS Target should exist. Changing this forces a new HPC Cache Blob NFS Target to be created.
- Storage
Container stringId The Resource Manager ID of the Storage Container used as the HPC Cache Blob NFS Target. Changing this forces a new resource to be created.
Note: This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the
azure.storage.ContainerData Source/Resource asresource_manager_id.- Usage
Model string - The type of usage of the HPC Cache Blob NFS Target. Possible values are:
READ_HEAVY_INFREQ,READ_HEAVY_CHECK_180,READ_ONLY,READ_WRITE,WRITE_WORKLOAD_15,WRITE_AROUND,WRITE_WORKLOAD_CHECK_30,WRITE_WORKLOAD_CHECK_60andWRITE_WORKLOAD_CLOUDWS. - Access
Policy stringName - The name of the access policy applied to this target. Defaults to
default. - Name string
- The name which should be used for this HPC Cache Blob NFS Target. Changing this forces a new HPC Cache Blob NFS Target to be created.
- Verification
Timer intIn Seconds - The amount of time the cache waits before it checks the back-end storage for file updates. Possible values are between
1and31536000. - Write
Back intTimer In Seconds - The amount of time the cache waits after the last file change before it copies the changed file to back-end storage. Possible values are between
1and31536000.
- cache
Name String - The name of the HPC Cache, which the HPC Cache Blob NFS Target will be added to. Changing this forces a new HPC Cache Blob NFS Target to be created.
- namespace
Path String - The client-facing file path of the HPC Cache Blob NFS Target.
- resource
Group StringName - The name of the Resource Group where the HPC Cache Blob NFS Target should exist. Changing this forces a new HPC Cache Blob NFS Target to be created.
- storage
Container StringId The Resource Manager ID of the Storage Container used as the HPC Cache Blob NFS Target. Changing this forces a new resource to be created.
Note: This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the
azure.storage.ContainerData Source/Resource asresource_manager_id.- usage
Model String - The type of usage of the HPC Cache Blob NFS Target. Possible values are:
READ_HEAVY_INFREQ,READ_HEAVY_CHECK_180,READ_ONLY,READ_WRITE,WRITE_WORKLOAD_15,WRITE_AROUND,WRITE_WORKLOAD_CHECK_30,WRITE_WORKLOAD_CHECK_60andWRITE_WORKLOAD_CLOUDWS. - access
Policy StringName - The name of the access policy applied to this target. Defaults to
default. - name String
- The name which should be used for this HPC Cache Blob NFS Target. Changing this forces a new HPC Cache Blob NFS Target to be created.
- verification
Timer IntegerIn Seconds - The amount of time the cache waits before it checks the back-end storage for file updates. Possible values are between
1and31536000. - write
Back IntegerTimer In Seconds - The amount of time the cache waits after the last file change before it copies the changed file to back-end storage. Possible values are between
1and31536000.
- cache
Name string - The name of the HPC Cache, which the HPC Cache Blob NFS Target will be added to. Changing this forces a new HPC Cache Blob NFS Target to be created.
- namespace
Path string - The client-facing file path of the HPC Cache Blob NFS Target.
- resource
Group stringName - The name of the Resource Group where the HPC Cache Blob NFS Target should exist. Changing this forces a new HPC Cache Blob NFS Target to be created.
- storage
Container stringId The Resource Manager ID of the Storage Container used as the HPC Cache Blob NFS Target. Changing this forces a new resource to be created.
Note: This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the
azure.storage.ContainerData Source/Resource asresource_manager_id.- usage
Model string - The type of usage of the HPC Cache Blob NFS Target. Possible values are:
READ_HEAVY_INFREQ,READ_HEAVY_CHECK_180,READ_ONLY,READ_WRITE,WRITE_WORKLOAD_15,WRITE_AROUND,WRITE_WORKLOAD_CHECK_30,WRITE_WORKLOAD_CHECK_60andWRITE_WORKLOAD_CLOUDWS. - access
Policy stringName - The name of the access policy applied to this target. Defaults to
default. - name string
- The name which should be used for this HPC Cache Blob NFS Target. Changing this forces a new HPC Cache Blob NFS Target to be created.
- verification
Timer numberIn Seconds - The amount of time the cache waits before it checks the back-end storage for file updates. Possible values are between
1and31536000. - write
Back numberTimer In Seconds - The amount of time the cache waits after the last file change before it copies the changed file to back-end storage. Possible values are between
1and31536000.
- cache_
name str - The name of the HPC Cache, which the HPC Cache Blob NFS Target will be added to. Changing this forces a new HPC Cache Blob NFS Target to be created.
- namespace_
path str - The client-facing file path of the HPC Cache Blob NFS Target.
- resource_
group_ strname - The name of the Resource Group where the HPC Cache Blob NFS Target should exist. Changing this forces a new HPC Cache Blob NFS Target to be created.
- storage_
container_ strid The Resource Manager ID of the Storage Container used as the HPC Cache Blob NFS Target. Changing this forces a new resource to be created.
Note: This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the
azure.storage.ContainerData Source/Resource asresource_manager_id.- usage_
model str - The type of usage of the HPC Cache Blob NFS Target. Possible values are:
READ_HEAVY_INFREQ,READ_HEAVY_CHECK_180,READ_ONLY,READ_WRITE,WRITE_WORKLOAD_15,WRITE_AROUND,WRITE_WORKLOAD_CHECK_30,WRITE_WORKLOAD_CHECK_60andWRITE_WORKLOAD_CLOUDWS. - access_
policy_ strname - The name of the access policy applied to this target. Defaults to
default. - name str
- The name which should be used for this HPC Cache Blob NFS Target. Changing this forces a new HPC Cache Blob NFS Target to be created.
- verification_
timer_ intin_ seconds - The amount of time the cache waits before it checks the back-end storage for file updates. Possible values are between
1and31536000. - write_
back_ inttimer_ in_ seconds - The amount of time the cache waits after the last file change before it copies the changed file to back-end storage. Possible values are between
1and31536000.
- cache
Name String - The name of the HPC Cache, which the HPC Cache Blob NFS Target will be added to. Changing this forces a new HPC Cache Blob NFS Target to be created.
- namespace
Path String - The client-facing file path of the HPC Cache Blob NFS Target.
- resource
Group StringName - The name of the Resource Group where the HPC Cache Blob NFS Target should exist. Changing this forces a new HPC Cache Blob NFS Target to be created.
- storage
Container StringId The Resource Manager ID of the Storage Container used as the HPC Cache Blob NFS Target. Changing this forces a new resource to be created.
Note: This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the
azure.storage.ContainerData Source/Resource asresource_manager_id.- usage
Model String - The type of usage of the HPC Cache Blob NFS Target. Possible values are:
READ_HEAVY_INFREQ,READ_HEAVY_CHECK_180,READ_ONLY,READ_WRITE,WRITE_WORKLOAD_15,WRITE_AROUND,WRITE_WORKLOAD_CHECK_30,WRITE_WORKLOAD_CHECK_60andWRITE_WORKLOAD_CLOUDWS. - access
Policy StringName - The name of the access policy applied to this target. Defaults to
default. - name String
- The name which should be used for this HPC Cache Blob NFS Target. Changing this forces a new HPC Cache Blob NFS Target to be created.
- verification
Timer NumberIn Seconds - The amount of time the cache waits before it checks the back-end storage for file updates. Possible values are between
1and31536000. - write
Back NumberTimer In Seconds - The amount of time the cache waits after the last file change before it copies the changed file to back-end storage. Possible values are between
1and31536000.
Outputs
All input properties are implicitly available as output properties. Additionally, the CacheBlobNfsTarget resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing CacheBlobNfsTarget Resource
Get an existing CacheBlobNfsTarget resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: CacheBlobNfsTargetState, opts?: CustomResourceOptions): CacheBlobNfsTarget@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
access_policy_name: Optional[str] = None,
cache_name: Optional[str] = None,
name: Optional[str] = None,
namespace_path: Optional[str] = None,
resource_group_name: Optional[str] = None,
storage_container_id: Optional[str] = None,
usage_model: Optional[str] = None,
verification_timer_in_seconds: Optional[int] = None,
write_back_timer_in_seconds: Optional[int] = None) -> CacheBlobNfsTargetfunc GetCacheBlobNfsTarget(ctx *Context, name string, id IDInput, state *CacheBlobNfsTargetState, opts ...ResourceOption) (*CacheBlobNfsTarget, error)public static CacheBlobNfsTarget Get(string name, Input<string> id, CacheBlobNfsTargetState? state, CustomResourceOptions? opts = null)public static CacheBlobNfsTarget get(String name, Output<String> id, CacheBlobNfsTargetState state, CustomResourceOptions options)resources: _: type: azure:hpc:CacheBlobNfsTarget get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Access
Policy stringName - The name of the access policy applied to this target. Defaults to
default. - Cache
Name string - The name of the HPC Cache, which the HPC Cache Blob NFS Target will be added to. Changing this forces a new HPC Cache Blob NFS Target to be created.
- Name string
- The name which should be used for this HPC Cache Blob NFS Target. Changing this forces a new HPC Cache Blob NFS Target to be created.
- Namespace
Path string - The client-facing file path of the HPC Cache Blob NFS Target.
- Resource
Group stringName - The name of the Resource Group where the HPC Cache Blob NFS Target should exist. Changing this forces a new HPC Cache Blob NFS Target to be created.
- Storage
Container stringId The Resource Manager ID of the Storage Container used as the HPC Cache Blob NFS Target. Changing this forces a new resource to be created.
Note: This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the
azure.storage.ContainerData Source/Resource asresource_manager_id.- Usage
Model string - The type of usage of the HPC Cache Blob NFS Target. Possible values are:
READ_HEAVY_INFREQ,READ_HEAVY_CHECK_180,READ_ONLY,READ_WRITE,WRITE_WORKLOAD_15,WRITE_AROUND,WRITE_WORKLOAD_CHECK_30,WRITE_WORKLOAD_CHECK_60andWRITE_WORKLOAD_CLOUDWS. - Verification
Timer intIn Seconds - The amount of time the cache waits before it checks the back-end storage for file updates. Possible values are between
1and31536000. - Write
Back intTimer In Seconds - The amount of time the cache waits after the last file change before it copies the changed file to back-end storage. Possible values are between
1and31536000.
- Access
Policy stringName - The name of the access policy applied to this target. Defaults to
default. - Cache
Name string - The name of the HPC Cache, which the HPC Cache Blob NFS Target will be added to. Changing this forces a new HPC Cache Blob NFS Target to be created.
- Name string
- The name which should be used for this HPC Cache Blob NFS Target. Changing this forces a new HPC Cache Blob NFS Target to be created.
- Namespace
Path string - The client-facing file path of the HPC Cache Blob NFS Target.
- Resource
Group stringName - The name of the Resource Group where the HPC Cache Blob NFS Target should exist. Changing this forces a new HPC Cache Blob NFS Target to be created.
- Storage
Container stringId The Resource Manager ID of the Storage Container used as the HPC Cache Blob NFS Target. Changing this forces a new resource to be created.
Note: This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the
azure.storage.ContainerData Source/Resource asresource_manager_id.- Usage
Model string - The type of usage of the HPC Cache Blob NFS Target. Possible values are:
READ_HEAVY_INFREQ,READ_HEAVY_CHECK_180,READ_ONLY,READ_WRITE,WRITE_WORKLOAD_15,WRITE_AROUND,WRITE_WORKLOAD_CHECK_30,WRITE_WORKLOAD_CHECK_60andWRITE_WORKLOAD_CLOUDWS. - Verification
Timer intIn Seconds - The amount of time the cache waits before it checks the back-end storage for file updates. Possible values are between
1and31536000. - Write
Back intTimer In Seconds - The amount of time the cache waits after the last file change before it copies the changed file to back-end storage. Possible values are between
1and31536000.
- access
Policy StringName - The name of the access policy applied to this target. Defaults to
default. - cache
Name String - The name of the HPC Cache, which the HPC Cache Blob NFS Target will be added to. Changing this forces a new HPC Cache Blob NFS Target to be created.
- name String
- The name which should be used for this HPC Cache Blob NFS Target. Changing this forces a new HPC Cache Blob NFS Target to be created.
- namespace
Path String - The client-facing file path of the HPC Cache Blob NFS Target.
- resource
Group StringName - The name of the Resource Group where the HPC Cache Blob NFS Target should exist. Changing this forces a new HPC Cache Blob NFS Target to be created.
- storage
Container StringId The Resource Manager ID of the Storage Container used as the HPC Cache Blob NFS Target. Changing this forces a new resource to be created.
Note: This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the
azure.storage.ContainerData Source/Resource asresource_manager_id.- usage
Model String - The type of usage of the HPC Cache Blob NFS Target. Possible values are:
READ_HEAVY_INFREQ,READ_HEAVY_CHECK_180,READ_ONLY,READ_WRITE,WRITE_WORKLOAD_15,WRITE_AROUND,WRITE_WORKLOAD_CHECK_30,WRITE_WORKLOAD_CHECK_60andWRITE_WORKLOAD_CLOUDWS. - verification
Timer IntegerIn Seconds - The amount of time the cache waits before it checks the back-end storage for file updates. Possible values are between
1and31536000. - write
Back IntegerTimer In Seconds - The amount of time the cache waits after the last file change before it copies the changed file to back-end storage. Possible values are between
1and31536000.
- access
Policy stringName - The name of the access policy applied to this target. Defaults to
default. - cache
Name string - The name of the HPC Cache, which the HPC Cache Blob NFS Target will be added to. Changing this forces a new HPC Cache Blob NFS Target to be created.
- name string
- The name which should be used for this HPC Cache Blob NFS Target. Changing this forces a new HPC Cache Blob NFS Target to be created.
- namespace
Path string - The client-facing file path of the HPC Cache Blob NFS Target.
- resource
Group stringName - The name of the Resource Group where the HPC Cache Blob NFS Target should exist. Changing this forces a new HPC Cache Blob NFS Target to be created.
- storage
Container stringId The Resource Manager ID of the Storage Container used as the HPC Cache Blob NFS Target. Changing this forces a new resource to be created.
Note: This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the
azure.storage.ContainerData Source/Resource asresource_manager_id.- usage
Model string - The type of usage of the HPC Cache Blob NFS Target. Possible values are:
READ_HEAVY_INFREQ,READ_HEAVY_CHECK_180,READ_ONLY,READ_WRITE,WRITE_WORKLOAD_15,WRITE_AROUND,WRITE_WORKLOAD_CHECK_30,WRITE_WORKLOAD_CHECK_60andWRITE_WORKLOAD_CLOUDWS. - verification
Timer numberIn Seconds - The amount of time the cache waits before it checks the back-end storage for file updates. Possible values are between
1and31536000. - write
Back numberTimer In Seconds - The amount of time the cache waits after the last file change before it copies the changed file to back-end storage. Possible values are between
1and31536000.
- access_
policy_ strname - The name of the access policy applied to this target. Defaults to
default. - cache_
name str - The name of the HPC Cache, which the HPC Cache Blob NFS Target will be added to. Changing this forces a new HPC Cache Blob NFS Target to be created.
- name str
- The name which should be used for this HPC Cache Blob NFS Target. Changing this forces a new HPC Cache Blob NFS Target to be created.
- namespace_
path str - The client-facing file path of the HPC Cache Blob NFS Target.
- resource_
group_ strname - The name of the Resource Group where the HPC Cache Blob NFS Target should exist. Changing this forces a new HPC Cache Blob NFS Target to be created.
- storage_
container_ strid The Resource Manager ID of the Storage Container used as the HPC Cache Blob NFS Target. Changing this forces a new resource to be created.
Note: This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the
azure.storage.ContainerData Source/Resource asresource_manager_id.- usage_
model str - The type of usage of the HPC Cache Blob NFS Target. Possible values are:
READ_HEAVY_INFREQ,READ_HEAVY_CHECK_180,READ_ONLY,READ_WRITE,WRITE_WORKLOAD_15,WRITE_AROUND,WRITE_WORKLOAD_CHECK_30,WRITE_WORKLOAD_CHECK_60andWRITE_WORKLOAD_CLOUDWS. - verification_
timer_ intin_ seconds - The amount of time the cache waits before it checks the back-end storage for file updates. Possible values are between
1and31536000. - write_
back_ inttimer_ in_ seconds - The amount of time the cache waits after the last file change before it copies the changed file to back-end storage. Possible values are between
1and31536000.
- access
Policy StringName - The name of the access policy applied to this target. Defaults to
default. - cache
Name String - The name of the HPC Cache, which the HPC Cache Blob NFS Target will be added to. Changing this forces a new HPC Cache Blob NFS Target to be created.
- name String
- The name which should be used for this HPC Cache Blob NFS Target. Changing this forces a new HPC Cache Blob NFS Target to be created.
- namespace
Path String - The client-facing file path of the HPC Cache Blob NFS Target.
- resource
Group StringName - The name of the Resource Group where the HPC Cache Blob NFS Target should exist. Changing this forces a new HPC Cache Blob NFS Target to be created.
- storage
Container StringId The Resource Manager ID of the Storage Container used as the HPC Cache Blob NFS Target. Changing this forces a new resource to be created.
Note: This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the
azure.storage.ContainerData Source/Resource asresource_manager_id.- usage
Model String - The type of usage of the HPC Cache Blob NFS Target. Possible values are:
READ_HEAVY_INFREQ,READ_HEAVY_CHECK_180,READ_ONLY,READ_WRITE,WRITE_WORKLOAD_15,WRITE_AROUND,WRITE_WORKLOAD_CHECK_30,WRITE_WORKLOAD_CHECK_60andWRITE_WORKLOAD_CLOUDWS. - verification
Timer NumberIn Seconds - The amount of time the cache waits before it checks the back-end storage for file updates. Possible values are between
1and31536000. - write
Back NumberTimer In Seconds - The amount of time the cache waits after the last file change before it copies the changed file to back-end storage. Possible values are between
1and31536000.
Import
HPC Cache Blob NFS Targets can be imported using the resource id, e.g.
$ pulumi import azure:hpc/cacheBlobNfsTarget:CacheBlobNfsTarget example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StorageCache/caches/cache1/storageTargets/target1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.
