All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.compute.kotlin.outputs.LinuxVirtualMachineOsDisk.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.compute.kotlin.outputs

import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress

/**
 *
 * @property caching The Type of Caching which should be used for the Internal OS Disk. Possible values are `None`, `ReadOnly` and `ReadWrite`.
 * @property diffDiskSettings A `diff_disk_settings` block as defined above. Changing this forces a new resource to be created.
 * > **NOTE:** `diff_disk_settings` can only be set when `caching` is set to `ReadOnly`. More information can be found [here](https://docs.microsoft.com/azure/virtual-machines/ephemeral-os-disks-deploy#vm-template-deployment)
 * @property diskEncryptionSetId The ID of the Disk Encryption Set which should be used to Encrypt this OS Disk. Conflicts with `secure_vm_disk_encryption_set_id`.
 * > **NOTE:** The Disk Encryption Set must have the `Reader` Role Assignment scoped on the Key Vault - in addition to an Access Policy to the Key Vault
 * @property diskSizeGb The Size of the Internal OS Disk in GB, if you wish to vary from the size used in the image this Virtual Machine is sourced from.
 * > **NOTE:** If specified this must be equal to or larger than the size of the Image the Virtual Machine is based on. When creating a larger disk than exists in the image you'll need to repartition the disk to use the remaining space.
 * @property name The name which should be used for the Internal OS Disk. Changing this forces a new resource to be created.
 * @property secureVmDiskEncryptionSetId The ID of the Disk Encryption Set which should be used to Encrypt this OS Disk when the Virtual Machine is a Confidential VM. Conflicts with `disk_encryption_set_id`. Changing this forces a new resource to be created.
 * > **NOTE:** `secure_vm_disk_encryption_set_id` can only be specified when `security_encryption_type` is set to `DiskWithVMGuestState`.
 * @property securityEncryptionType Encryption Type when the Virtual Machine is a Confidential VM. Possible values are `VMGuestStateOnly` and `DiskWithVMGuestState`. Changing this forces a new resource to be created.
 * > **NOTE:** `vtpm_enabled` must be set to `true` when `security_encryption_type` is specified.
 * > **NOTE:** `encryption_at_host_enabled` cannot be set to `true` when `security_encryption_type` is set to `DiskWithVMGuestState`.
 * @property storageAccountType The Type of Storage Account which should back this the Internal OS Disk. Possible values are `Standard_LRS`, `StandardSSD_LRS`, `Premium_LRS`, `StandardSSD_ZRS` and `Premium_ZRS`. Changing this forces a new resource to be created.
 * @property writeAcceleratorEnabled Should Write Accelerator be Enabled for this OS Disk? Defaults to `false`.
 * > **NOTE:** This requires that the `storage_account_type` is set to `Premium_LRS` and that `caching` is set to `None`.
 */
public data class LinuxVirtualMachineOsDisk(
    public val caching: String,
    public val diffDiskSettings: LinuxVirtualMachineOsDiskDiffDiskSettings? = null,
    public val diskEncryptionSetId: String? = null,
    public val diskSizeGb: Int? = null,
    public val name: String? = null,
    public val secureVmDiskEncryptionSetId: String? = null,
    public val securityEncryptionType: String? = null,
    public val storageAccountType: String,
    public val writeAcceleratorEnabled: Boolean? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.azure.compute.outputs.LinuxVirtualMachineOsDisk): LinuxVirtualMachineOsDisk = LinuxVirtualMachineOsDisk(
            caching = javaType.caching(),
            diffDiskSettings = javaType.diffDiskSettings().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.azure.compute.kotlin.outputs.LinuxVirtualMachineOsDiskDiffDiskSettings.Companion.toKotlin(args0)
                })
            }).orElse(null),
            diskEncryptionSetId = javaType.diskEncryptionSetId().map({ args0 -> args0 }).orElse(null),
            diskSizeGb = javaType.diskSizeGb().map({ args0 -> args0 }).orElse(null),
            name = javaType.name().map({ args0 -> args0 }).orElse(null),
            secureVmDiskEncryptionSetId = javaType.secureVmDiskEncryptionSetId().map({ args0 ->
                args0
            }).orElse(null),
            securityEncryptionType = javaType.securityEncryptionType().map({ args0 -> args0 }).orElse(null),
            storageAccountType = javaType.storageAccountType(),
            writeAcceleratorEnabled = javaType.writeAcceleratorEnabled().map({ args0 -> args0 }).orElse(null),
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy