ModuleArgs

data class ModuleArgs(val location: Output<String>? = null, val managementNetworkProfile: Output<ModuleManagementNetworkProfileArgs>? = null, val name: Output<String>? = null, val networkProfile: Output<ModuleNetworkProfileArgs>? = null, val resourceGroupName: Output<String>? = null, val skuName: Output<String>? = null, val stampId: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val zones: Output<List<String>>? = null) : ConvertibleToJava<ModuleArgs>

Manages a Dedicated Hardware Security Module.

Note: Before using this resource, it's required to submit the request of registering the providers and features with Azure CLI az provider register --namespace Microsoft.HardwareSecurityModules && az feature register --namespace Microsoft.HardwareSecurityModules --name AzureDedicatedHSM && az provider register --namespace Microsoft.Network && az feature register --namespace Microsoft.Network --name AllowBaremetalServers and ask service team (hsmrequest@microsoft.com) to approve. See more details from https://docs.microsoft.com/azure/dedicated-hsm/tutorial-deploy-hsm-cli#prerequisites. Note: If the quota is not enough in some region, please submit the quota request to service team.

Example Usage

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.network.inputs.SubnetDelegationArgs;
import com.pulumi.azure.network.inputs.SubnetDelegationServiceDelegationArgs;
import com.pulumi.azure.network.PublicIp;
import com.pulumi.azure.network.PublicIpArgs;
import com.pulumi.azure.network.VirtualNetworkGateway;
import com.pulumi.azure.network.VirtualNetworkGatewayArgs;
import com.pulumi.azure.network.inputs.VirtualNetworkGatewayIpConfigurationArgs;
import com.pulumi.azure.hsm.Module;
import com.pulumi.azure.hsm.ModuleArgs;
import com.pulumi.azure.hsm.inputs.ModuleManagementNetworkProfileArgs;
import com.pulumi.azure.hsm.inputs.ModuleNetworkProfileArgs;
import com.pulumi.resources.CustomResourceOptions;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
.addressSpaces("10.2.0.0/16")
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.build());
var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.virtualNetworkName(exampleVirtualNetwork.name())
.addressPrefixes("10.2.0.0/24")
.build());
var example2 = new Subnet("example2", SubnetArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.virtualNetworkName(exampleVirtualNetwork.name())
.addressPrefixes("10.2.1.0/24")
.delegations(SubnetDelegationArgs.builder()
.name("first")
.serviceDelegation(SubnetDelegationServiceDelegationArgs.builder()
.name("Microsoft.HardwareSecurityModules/dedicatedHSMs")
.actions(
"Microsoft.Network/networkinterfaces/*",
"Microsoft.Network/virtualNetworks/subnets/join/action")
.build())
.build())
.build());
var example3 = new Subnet("example3", SubnetArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.virtualNetworkName(exampleVirtualNetwork.name())
.addressPrefixes("10.2.255.0/26")
.build());
var examplePublicIp = new PublicIp("examplePublicIp", PublicIpArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.allocationMethod("Dynamic")
.build());
var exampleVirtualNetworkGateway = new VirtualNetworkGateway("exampleVirtualNetworkGateway", VirtualNetworkGatewayArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.type("ExpressRoute")
.vpnType("PolicyBased")
.sku("Standard")
.ipConfigurations(VirtualNetworkGatewayIpConfigurationArgs.builder()
.publicIpAddressId(examplePublicIp.id())
.privateIpAddressAllocation("Dynamic")
.subnetId(example3.id())
.build())
.build());
var exampleModule = new Module("exampleModule", ModuleArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.skuName("payShield10K_LMK1_CPS60")
.managementNetworkProfile(ModuleManagementNetworkProfileArgs.builder()
.networkInterfacePrivateIpAddresses("10.2.1.7")
.subnetId(example2.id())
.build())
.networkProfile(ModuleNetworkProfileArgs.builder()
.networkInterfacePrivateIpAddresses("10.2.1.8")
.subnetId(example2.id())
.build())
.stampId("stamp2")
.tags(Map.of("env", "Test"))
.build(), CustomResourceOptions.builder()
.dependsOn(exampleVirtualNetworkGateway)
.build());
}
}

Import

Dedicated Hardware Security Module can be imported using the resource id, e.g.

$ pulumi import azure:hsm/module:Module example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/hsm1

Constructors

Link copied to clipboard
fun ModuleArgs(location: Output<String>? = null, managementNetworkProfile: Output<ModuleManagementNetworkProfileArgs>? = null, name: Output<String>? = null, networkProfile: Output<ModuleNetworkProfileArgs>? = null, resourceGroupName: Output<String>? = null, skuName: Output<String>? = null, stampId: Output<String>? = null, tags: Output<Map<String, String>>? = null, zones: Output<List<String>>? = null)

Functions

Link copied to clipboard
open override fun toJava(): ModuleArgs

Properties

Link copied to clipboard
val location: Output<String>? = null

The Azure Region where the Dedicated Hardware Security Module should exist. Changing this forces a new Dedicated Hardware Security Module to be created.

Link copied to clipboard

A management_network_profile block as defined below. ->NOTE: The management_network_profile should not be specified when sku_name is SafeNet Luna Network HSM A790.

Link copied to clipboard
val name: Output<String>? = null

The name which should be used for this Dedicated Hardware Security Module. Changing this forces a new Dedicated Hardware Security Module to be created.

Link copied to clipboard

A network_profile block as defined below.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the Resource Group where the Dedicated Hardware Security Module should exist. Changing this forces a new Dedicated Hardware Security Module to be created.

Link copied to clipboard
val skuName: Output<String>? = null

The SKU name of the dedicated hardware security module. Possible values are payShield10K_LMK1_CPS60,payShield10K_LMK1_CPS250,payShield10K_LMK1_CPS2500,payShield10K_LMK2_CPS60,payShield10K_LMK2_CPS250,payShield10K_LMK2_CPS2500 and SafeNet Luna Network HSM A790. Changing this forces a new Dedicated Hardware Security Module to be created.

Link copied to clipboard
val stampId: Output<String>? = null

The ID of the stamp. Possible values are stamp1 or stamp2. Changing this forces a new Dedicated Hardware Security Module to be created.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A mapping of tags which should be assigned to the Dedicated Hardware Security Module.

Link copied to clipboard
val zones: Output<List<String>>? = null

Specifies a list of Availability Zones in which this Dedicated Hardware Security Module should be located. Changing this forces a new Dedicated Hardware Security Module to be created. */