import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages a NFS Target within a HPC Cache. * * !> **Note:** The `azure.hpc.CacheNfsTarget` 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 registering the `Microsoft.StorageCache` Resource Provider for this resource. To register it you can run `az provider register --namespace 'Microsoft.StorageCache'`. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * import * as std from "@pulumi/std"; * * const example = new azure.core.ResourceGroup("example", { * name: "example-resources", * location: "West Europe", * }); * const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", { * name: "examplevn", * addressSpaces: ["10.0.0.0/16"], * location: example.location, * resourceGroupName: example.name, * }); * const exampleHpc = new azure.network.Subnet("example_hpc", { * name: "examplesubnethpc", * resourceGroupName: example.name, * virtualNetworkName: exampleVirtualNetwork.name, * addressPrefixes: ["10.0.1.0/24"], * }); * const exampleCache = new azure.hpc.Cache("example", { * name: "examplehpccache", * resourceGroupName: example.name, * location: example.location, * cacheSizeInGb: 3072, * subnetId: exampleHpc.id, * skuName: "Standard_2G", * }); * const exampleVm = new azure.network.Subnet("example_vm", { * name: "examplesubnetvm", * resourceGroupName: example.name, * virtualNetworkName: exampleVirtualNetwork.name, * addressPrefixes: ["10.0.2.0/24"], * }); * const exampleNetworkInterface = new azure.network.NetworkInterface("example", { * name: "examplenic", * location: example.location, * resourceGroupName: example.name, * ipConfigurations: [{ * name: "internal", * subnetId: exampleVm.id, * privateIpAddressAllocation: "Dynamic", * }], * }); * const customData = `#!/bin/bash * sudo -i * apt-get install -y nfs-kernel-server * mkdir -p /export/a/1 * mkdir -p /export/a/2 * mkdir -p /export/b * cat << EOF > /etc/exports * /export/a *(rw,fsid=0,insecure,no_subtree_check,async) * /export/b *(rw,fsid=0,insecure,no_subtree_check,async) * EOF * systemctl start nfs-server * exportfs -arv * `; * const exampleLinuxVirtualMachine = new azure.compute.LinuxVirtualMachine("example", { * name: "examplevm", * resourceGroupName: example.name, * location: example.location, * size: "Standard_F2", * adminUsername: "adminuser", * networkInterfaceIds: [exampleNetworkInterface.id], * adminSshKeys: [{ * username: "adminuser", * publicKey: std.file({ * input: "~/.ssh/id_rsa.pub", * }).then(invoke => invoke.result), * }], * osDisk: { * caching: "ReadWrite", * storageAccountType: "Standard_LRS", * }, * sourceImageReference: { * publisher: "Canonical", * offer: "0001-com-ubuntu-server-jammy", * sku: "22_04-lts", * version: "latest", * }, * customData: std.base64encode({ * input: customData, * }).then(invoke => invoke.result), * }); * const exampleCacheNfsTarget = new azure.hpc.CacheNfsTarget("example", { * name: "examplehpcnfstarget", * resourceGroupName: example.name, * cacheName: exampleCache.name, * targetHostName: exampleLinuxVirtualMachine.privateIpAddress, * usageModel: "READ_HEAVY_INFREQ", * namespaceJunctions: [ * { * namespacePath: "/nfs/a1", * nfsExport: "/export/a", * targetPath: "1", * }, * { * namespacePath: "/nfs/b", * nfsExport: "/export/b", * }, * ], * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.StorageCache` - 2023-05-01 * * ## Import * * NFS Target within a HPC Cache can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:hpc/cacheNfsTarget:CacheNfsTarget example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StorageCache/caches/cache1/storageTargets/target1 * ``` */ export declare class CacheNfsTarget extends pulumi.CustomResource { /** * Get an existing CacheNfsTarget resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: CacheNfsTargetState, opts?: pulumi.CustomResourceOptions): CacheNfsTarget; /** * Returns true if the given object is an instance of CacheNfsTarget. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is CacheNfsTarget; /** * The name HPC Cache, which the HPC Cache NFS Target will be added to. Changing this forces a new resource to be created. */ readonly cacheName: pulumi.Output; /** * The name of the HPC Cache NFS Target. Changing this forces a new resource to be created. */ readonly name: pulumi.Output; /** * Can be specified multiple times to define multiple `namespaceJunction`. Each `namespaceJunction` block supports fields documented below. */ readonly namespaceJunctions: pulumi.Output; /** * The name of the Resource Group in which to create the HPC Cache NFS Target. Changing this forces a new resource to be created. */ readonly resourceGroupName: pulumi.Output; /** * The IP address or fully qualified domain name (FQDN) of the HPC Cache NFS target. Changing this forces a new resource to be created. */ readonly targetHostName: pulumi.Output; /** * The type of usage of the HPC Cache 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_60` and `WRITE_WORKLOAD_CLOUDWS`. */ readonly usageModel: pulumi.Output; /** * The amount of time the cache waits before it checks the back-end storage for file updates. Possible values are between `1` and `31536000`. */ readonly verificationTimerInSeconds: pulumi.Output; /** * 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 `1` and `31536000`. */ readonly writeBackTimerInSeconds: pulumi.Output; /** * Create a CacheNfsTarget resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: CacheNfsTargetArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering CacheNfsTarget resources. */ export interface CacheNfsTargetState { /** * The name HPC Cache, which the HPC Cache NFS Target will be added to. Changing this forces a new resource to be created. */ cacheName?: pulumi.Input; /** * The name of the HPC Cache NFS Target. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * Can be specified multiple times to define multiple `namespaceJunction`. Each `namespaceJunction` block supports fields documented below. */ namespaceJunctions?: pulumi.Input[]>; /** * The name of the Resource Group in which to create the HPC Cache NFS Target. Changing this forces a new resource to be created. */ resourceGroupName?: pulumi.Input; /** * The IP address or fully qualified domain name (FQDN) of the HPC Cache NFS target. Changing this forces a new resource to be created. */ targetHostName?: pulumi.Input; /** * The type of usage of the HPC Cache 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_60` and `WRITE_WORKLOAD_CLOUDWS`. */ usageModel?: pulumi.Input; /** * The amount of time the cache waits before it checks the back-end storage for file updates. Possible values are between `1` and `31536000`. */ verificationTimerInSeconds?: pulumi.Input; /** * 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 `1` and `31536000`. */ writeBackTimerInSeconds?: pulumi.Input; } /** * The set of arguments for constructing a CacheNfsTarget resource. */ export interface CacheNfsTargetArgs { /** * The name HPC Cache, which the HPC Cache NFS Target will be added to. Changing this forces a new resource to be created. */ cacheName: pulumi.Input; /** * The name of the HPC Cache NFS Target. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * Can be specified multiple times to define multiple `namespaceJunction`. Each `namespaceJunction` block supports fields documented below. */ namespaceJunctions: pulumi.Input[]>; /** * The name of the Resource Group in which to create the HPC Cache NFS Target. Changing this forces a new resource to be created. */ resourceGroupName: pulumi.Input; /** * The IP address or fully qualified domain name (FQDN) of the HPC Cache NFS target. Changing this forces a new resource to be created. */ targetHostName: pulumi.Input; /** * The type of usage of the HPC Cache 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_60` and `WRITE_WORKLOAD_CLOUDWS`. */ usageModel: pulumi.Input; /** * The amount of time the cache waits before it checks the back-end storage for file updates. Possible values are between `1` and `31536000`. */ verificationTimerInSeconds?: pulumi.Input; /** * 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 `1` and `31536000`. */ writeBackTimerInSeconds?: pulumi.Input; }