com.pulumi.azure.managedlustre.kotlin.FileSystem.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.managedlustre.kotlin
import com.pulumi.azure.managedlustre.kotlin.outputs.FileSystemEncryptionKey
import com.pulumi.azure.managedlustre.kotlin.outputs.FileSystemHsmSetting
import com.pulumi.azure.managedlustre.kotlin.outputs.FileSystemIdentity
import com.pulumi.azure.managedlustre.kotlin.outputs.FileSystemMaintenanceWindow
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import com.pulumi.azure.managedlustre.kotlin.outputs.FileSystemEncryptionKey.Companion.toKotlin as fileSystemEncryptionKeyToKotlin
import com.pulumi.azure.managedlustre.kotlin.outputs.FileSystemHsmSetting.Companion.toKotlin as fileSystemHsmSettingToKotlin
import com.pulumi.azure.managedlustre.kotlin.outputs.FileSystemIdentity.Companion.toKotlin as fileSystemIdentityToKotlin
import com.pulumi.azure.managedlustre.kotlin.outputs.FileSystemMaintenanceWindow.Companion.toKotlin as fileSystemMaintenanceWindowToKotlin
/**
* Builder for [FileSystem].
*/
@PulumiTagMarker
public class FileSystemResourceBuilder internal constructor() {
public var name: String? = null
public var args: FileSystemArgs = FileSystemArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend FileSystemArgsBuilder.() -> Unit) {
val builder = FileSystemArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): FileSystem {
val builtJavaResource = com.pulumi.azure.managedlustre.FileSystem(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return FileSystem(builtJavaResource)
}
}
/**
* Manages an Azure Managed Lustre File System.
* ## Example Usage
*
* ```java
* 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.azure.managedlustre.FileSystem;
* import com.pulumi.azure.managedlustre.FileSystemArgs;
* import com.pulumi.azure.managedlustre.inputs.FileSystemMaintenanceWindowArgs;
* 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
* .name("example-resources")
* .location("West Europe")
* .build());
* var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
* .name("example-vnet")
* .addressSpaces("10.0.0.0/16")
* .location(example.location())
* .resourceGroupName(example.name())
* .build());
* var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
* .name("example-subnet")
* .resourceGroupName(example.name())
* .virtualNetworkName(exampleVirtualNetwork.name())
* .addressPrefixes("10.0.2.0/24")
* .build());
* var exampleFileSystem = new FileSystem("exampleFileSystem", FileSystemArgs.builder()
* .name("example-amlfs")
* .resourceGroupName(example.name())
* .location(example.location())
* .skuName("AMLFS-Durable-Premium-250")
* .subnetId(exampleSubnet.id())
* .storageCapacityInTb(8)
* .zones("2")
* .maintenanceWindow(FileSystemMaintenanceWindowArgs.builder()
* .dayOfWeek("Friday")
* .timeOfDayUtc("22:00")
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-resources
* location: West Europe
* exampleVirtualNetwork:
* type: azure:network:VirtualNetwork
* name: example
* properties:
* name: example-vnet
* addressSpaces:
* - 10.0.0.0/16
* location: ${example.location}
* resourceGroupName: ${example.name}
* exampleSubnet:
* type: azure:network:Subnet
* name: example
* properties:
* name: example-subnet
* resourceGroupName: ${example.name}
* virtualNetworkName: ${exampleVirtualNetwork.name}
* addressPrefixes:
* - 10.0.2.0/24
* exampleFileSystem:
* type: azure:managedlustre:FileSystem
* name: example
* properties:
* name: example-amlfs
* resourceGroupName: ${example.name}
* location: ${example.location}
* skuName: AMLFS-Durable-Premium-250
* subnetId: ${exampleSubnet.id}
* storageCapacityInTb: 8
* zones:
* - '2'
* maintenanceWindow:
* dayOfWeek: Friday
* timeOfDayUtc: 22:00
* ```
*
* ## Import
* Azure Managed Lustre File Systems can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:managedlustre/fileSystem:FileSystem example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.StorageCache/amlFilesystems/amlFilesystem1
* ```
*/
public class FileSystem internal constructor(
override val javaResource: com.pulumi.azure.managedlustre.FileSystem,
) : KotlinCustomResource(javaResource, FileSystemMapper) {
/**
* An `encryption_key` block as defined below.
* > **NOTE:** Removing `encryption_key` forces a new resource to be created.
*/
public val encryptionKey: Output?
get() = javaResource.encryptionKey().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> fileSystemEncryptionKeyToKotlin(args0) })
}).orElse(null)
})
/**
* A `hsm_setting` block as defined below. Changing this forces a new resource to be created.
*/
public val hsmSetting: Output?
get() = javaResource.hsmSetting().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
fileSystemHsmSettingToKotlin(args0)
})
}).orElse(null)
})
/**
* An `identity` block as defined below. Changing this forces a new resource to be created.
*/
public val identity: Output?
get() = javaResource.identity().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
fileSystemIdentityToKotlin(args0)
})
}).orElse(null)
})
/**
* The Azure Region where the Azure Managed Lustre File System should exist. Changing this forces a new resource to be created.
*/
public val location: Output
get() = javaResource.location().applyValue({ args0 -> args0 })
/**
* A `maintenance_window` block as defined below.
*/
public val maintenanceWindow: Output
get() = javaResource.maintenanceWindow().applyValue({ args0 ->
args0.let({ args0 ->
fileSystemMaintenanceWindowToKotlin(args0)
})
})
/**
* IP Address of Managed Lustre File System Services.
*/
public val mgsAddress: Output
get() = javaResource.mgsAddress().applyValue({ args0 -> args0 })
/**
* The name which should be used for this Azure Managed Lustre File System. Changing this forces a new resource to be created.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The name of the Resource Group where the Azure Managed Lustre File System should exist. Changing this forces a new resource to be created.
*/
public val resourceGroupName: Output
get() = javaResource.resourceGroupName().applyValue({ args0 -> args0 })
/**
* The SKU name for the Azure Managed Lustre File System. Possible values are `AMLFS-Durable-Premium-40`, `AMLFS-Durable-Premium-125`, `AMLFS-Durable-Premium-250` and `AMLFS-Durable-Premium-500`. Changing this forces a new resource to be created.
*/
public val skuName: Output
get() = javaResource.skuName().applyValue({ args0 -> args0 })
/**
* The size of the Azure Managed Lustre File System in TiB. The valid values for this field are dependant on which `sku_name` has been defined in the configuration file. For more information on the valid values for this field please see the [product documentation](https://learn.microsoft.com/azure/azure-managed-lustre/create-file-system-resource-manager#file-system-type-and-size-options). Changing this forces a new resource to be created.
*/
public val storageCapacityInTb: Output
get() = javaResource.storageCapacityInTb().applyValue({ args0 -> args0 })
/**
* The resource ID of the Subnet that is used for managing the Azure Managed Lustre file system and for client-facing operations. This subnet should have at least a /24 subnet mask within the Virtual Network's address space. Changing this forces a new resource to be created.
*/
public val subnetId: Output
get() = javaResource.subnetId().applyValue({ args0 -> args0 })
/**
* A mapping of tags which should be assigned to the Azure Managed Lustre File System.
*/
public val tags: Output