com.pulumi.azure.keyvault.kotlin.ManagedHardwareSecurityModuleRoleDefinitionArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-kotlin Show documentation
Show all versions of pulumi-azure-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.keyvault.kotlin
import com.pulumi.azure.keyvault.ManagedHardwareSecurityModuleRoleDefinitionArgs.builder
import com.pulumi.azure.keyvault.kotlin.inputs.ManagedHardwareSecurityModuleRoleDefinitionPermissionArgs
import com.pulumi.azure.keyvault.kotlin.inputs.ManagedHardwareSecurityModuleRoleDefinitionPermissionArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* Manages a KeyVault Managed Hardware Security Module Role Definition. This resource works together with Managed hardware security module resource.
* ## Example Usage
*
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azure.keyvault.ManagedHardwareSecurityModule;
* import com.pulumi.azure.keyvault.ManagedHardwareSecurityModuleArgs;
* import com.pulumi.azure.keyvault.ManagedHardwareSecurityModuleRoleDefinition;
* import com.pulumi.azure.keyvault.ManagedHardwareSecurityModuleRoleDefinitionArgs;
* import com.pulumi.azure.keyvault.inputs.ManagedHardwareSecurityModuleRoleDefinitionPermissionArgs;
* 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 ManagedHardwareSecurityModule("example", ManagedHardwareSecurityModuleArgs.builder()
* .name("example")
* .resourceGroupName(exampleAzurermResourceGroup.name())
* .location(exampleAzurermResourceGroup.location())
* .skuName("Standard_B1")
* .tenantId(current.tenantId())
* .adminObjectIds(current.objectId())
* .purgeProtectionEnabled(false)
* .activeConfig(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
* .build());
* var exampleManagedHardwareSecurityModuleRoleDefinition = new ManagedHardwareSecurityModuleRoleDefinition("exampleManagedHardwareSecurityModuleRoleDefinition", ManagedHardwareSecurityModuleRoleDefinitionArgs.builder()
* .name("7d206142-bf01-11ed-80bc-00155d61ee9e")
* .vaultBaseUrl(example.hsmUri())
* .description("desc foo")
* .permissions(ManagedHardwareSecurityModuleRoleDefinitionPermissionArgs.builder()
* .dataActions("Microsoft.KeyVault/managedHsm/keys/read/action")
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:keyvault:ManagedHardwareSecurityModule
* properties:
* name: example
* resourceGroupName: ${exampleAzurermResourceGroup.name}
* location: ${exampleAzurermResourceGroup.location}
* skuName: Standard_B1
* tenantId: ${current.tenantId}
* adminObjectIds:
* - ${current.objectId}
* purgeProtectionEnabled: false
* activeConfig:
* - securityDomainCertificate:
* - ${cert[0].id}
* - ${cert[1].id}
* - ${cert[2].id}
* securityDomainQuorum: 2
* exampleManagedHardwareSecurityModuleRoleDefinition:
* type: azure:keyvault:ManagedHardwareSecurityModuleRoleDefinition
* name: example
* properties:
* name: 7d206142-bf01-11ed-80bc-00155d61ee9e
* vaultBaseUrl: ${example.hsmUri}
* description: desc foo
* permissions:
* - dataActions:
* - Microsoft.KeyVault/managedHsm/keys/read/action
* ```
*
* ## Import
* KeyVaults can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:keyvault/managedHardwareSecurityModuleRoleDefinition:ManagedHardwareSecurityModuleRoleDefinition example https://0000.managedhsm.azure.net///RoleDefinition/00000000-0000-0000-0000-000000000000
* ```
* @property description Specifies a text description about this KeyVault Role Definition.
* @property managedHsmId
* @property name The name which should be used for this KeyVault Role Definition. Changing this forces a new KeyVault Role Definition to be created.
* @property permissions One or more `permission` blocks as defined below.
* @property roleName Specify a name for this KeyVault Role Definition.
* @property vaultBaseUrl The base URL of the managed hardware security module resource. Changing this forces a new KeyVault Role Definition to be created.
*/
public data class ManagedHardwareSecurityModuleRoleDefinitionArgs(
public val description: Output? = null,
public val managedHsmId: Output? = null,
public val name: Output? = null,
public val permissions: Output>? =
null,
public val roleName: Output? = null,
public val vaultBaseUrl: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.keyvault.ManagedHardwareSecurityModuleRoleDefinitionArgs =
com.pulumi.azure.keyvault.ManagedHardwareSecurityModuleRoleDefinitionArgs.builder()
.description(description?.applyValue({ args0 -> args0 }))
.managedHsmId(managedHsmId?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.permissions(
permissions?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.roleName(roleName?.applyValue({ args0 -> args0 }))
.vaultBaseUrl(vaultBaseUrl?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [ManagedHardwareSecurityModuleRoleDefinitionArgs].
*/
@PulumiTagMarker
public class ManagedHardwareSecurityModuleRoleDefinitionArgsBuilder internal constructor() {
private var description: Output? = null
private var managedHsmId: Output? = null
private var name: Output? = null
private var permissions: Output>? =
null
private var roleName: Output? = null
private var vaultBaseUrl: Output? = null
/**
* @param value Specifies a text description about this KeyVault Role Definition.
*/
@JvmName("ytqtjthgacebwbmr")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value
*/
@JvmName("mveffnyjqyvweobv")
public suspend fun managedHsmId(`value`: Output) {
this.managedHsmId = value
}
/**
* @param value The name which should be used for this KeyVault Role Definition. Changing this forces a new KeyVault Role Definition to be created.
*/
@JvmName("egrvyqclwniocsdc")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value One or more `permission` blocks as defined below.
*/
@JvmName("rmysmlorxlfmpnet")
public suspend
fun permissions(`value`: Output>) {
this.permissions = value
}
@JvmName("wnhwvnnshyoaxrfj")
public suspend fun permissions(
vararg
values: Output,
) {
this.permissions = Output.all(values.asList())
}
/**
* @param values One or more `permission` blocks as defined below.
*/
@JvmName("lrmbyluxlavtkxbo")
public suspend
fun permissions(values: List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy