Managed Hardware Security Module
Manages a Key Vault Managed Hardware Security Module.
Note: The Azure Provider includes a Feature Toggle which will purge a Key Vault Managed Hardware Security Module resource on destroy, rather than the default soft-delete. See
purge_soft_deleted_hardware_security_modules_on_destroy
for more information.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.CoreFunctions;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.keyvault.ManagedHardwareSecurityModule;
import com.pulumi.azure.keyvault.ManagedHardwareSecurityModuleArgs;
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) {
final var current = CoreFunctions.getClientConfig();
var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleManagedHardwareSecurityModule = new ManagedHardwareSecurityModule("exampleManagedHardwareSecurityModule", ManagedHardwareSecurityModuleArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.skuName("Standard_B1")
.purgeProtectionEnabled(false)
.softDeleteRetentionDays(90)
.tenantId(current.applyValue(getClientConfigResult -> getClientConfigResult.tenantId()))
.adminObjectIds(current.applyValue(getClientConfigResult -> getClientConfigResult.objectId()))
.tags(Map.of("Env", "Test"))
.build());
}
}
Content copied to clipboard
Import
Key Vault Managed Hardware Security Module can be imported using the resource id
, e.g.
$ pulumi import azure:keyvault/managedHardwareSecurityModule:ManagedHardwareSecurityModule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.KeyVault/managedHSMs/hsm1
Content copied to clipboard
Properties
Link copied to clipboard
A list of KeyVault certificates resource IDs (minimum of three and up to a maximum of 10) to activate this Managed HSM. More information see activate-your-managed-hsm