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

com.pulumi.azure.hsm.Module Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.

There is a newer version: 6.10.0-alpha.1731737215
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azure.hsm;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.hsm.ModuleArgs;
import com.pulumi.azure.hsm.inputs.ModuleState;
import com.pulumi.azure.hsm.outputs.ModuleManagementNetworkProfile;
import com.pulumi.azure.hsm.outputs.ModuleNetworkProfile;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * 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{@literal @}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
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * 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 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.2.0.0/16")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .build());
 * 
 *         var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
 *             .name("example-compute")
 *             .resourceGroupName(example.name())
 *             .virtualNetworkName(exampleVirtualNetwork.name())
 *             .addressPrefixes("10.2.0.0/24")
 *             .build());
 * 
 *         var example2 = new Subnet("example2", SubnetArgs.builder()
 *             .name("example-hsmsubnet")
 *             .resourceGroupName(example.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()
 *             .name("gatewaysubnet")
 *             .resourceGroupName(example.name())
 *             .virtualNetworkName(exampleVirtualNetwork.name())
 *             .addressPrefixes("10.2.255.0/26")
 *             .build());
 * 
 *         var examplePublicIp = new PublicIp("examplePublicIp", PublicIpArgs.builder()
 *             .name("example-pip")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .allocationMethod("Static")
 *             .build());
 * 
 *         var exampleVirtualNetworkGateway = new VirtualNetworkGateway("exampleVirtualNetworkGateway", VirtualNetworkGatewayArgs.builder()
 *             .name("example-vnetgateway")
 *             .location(example.location())
 *             .resourceGroupName(example.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()
 *             .name("example-hsm")
 *             .location(example.location())
 *             .resourceGroupName(example.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());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Dedicated Hardware Security Module can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:hsm/module:Module example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/hsm1 * ``` * */ @ResourceType(type="azure:hsm/module:Module") public class Module extends com.pulumi.resources.CustomResource { /** * The Azure Region where the Dedicated Hardware Security Module should exist. Changing this forces a new Dedicated Hardware Security Module to be created. * */ @Export(name="location", refs={String.class}, tree="[0]") private Output location; /** * @return The Azure Region where the Dedicated Hardware Security Module should exist. Changing this forces a new Dedicated Hardware Security Module to be created. * */ public Output location() { return this.location; } /** * 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`. * */ @Export(name="managementNetworkProfile", refs={ModuleManagementNetworkProfile.class}, tree="[0]") private Output managementNetworkProfile; /** * @return 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`. * */ public Output> managementNetworkProfile() { return Codegen.optional(this.managementNetworkProfile); } /** * The name which should be used for this Dedicated Hardware Security Module. Changing this forces a new Dedicated Hardware Security Module to be created. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The name which should be used for this Dedicated Hardware Security Module. Changing this forces a new Dedicated Hardware Security Module to be created. * */ public Output name() { return this.name; } /** * A `network_profile` block as defined below. * */ @Export(name="networkProfile", refs={ModuleNetworkProfile.class}, tree="[0]") private Output networkProfile; /** * @return A `network_profile` block as defined below. * */ public Output networkProfile() { return this.networkProfile; } /** * 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. * */ @Export(name="resourceGroupName", refs={String.class}, tree="[0]") private Output resourceGroupName; /** * @return 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. * */ public Output resourceGroupName() { return this.resourceGroupName; } /** * 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. * */ @Export(name="skuName", refs={String.class}, tree="[0]") private Output skuName; /** * @return 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. * */ public Output skuName() { return this.skuName; } /** * The ID of the stamp. Possible values are `stamp1` or `stamp2`. Changing this forces a new Dedicated Hardware Security Module to be created. * */ @Export(name="stampId", refs={String.class}, tree="[0]") private Output stampId; /** * @return The ID of the stamp. Possible values are `stamp1` or `stamp2`. Changing this forces a new Dedicated Hardware Security Module to be created. * */ public Output> stampId() { return Codegen.optional(this.stampId); } /** * A mapping of tags which should be assigned to the Dedicated Hardware Security Module. * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return A mapping of tags which should be assigned to the Dedicated Hardware Security Module. * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * 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. * */ @Export(name="zones", refs={List.class,String.class}, tree="[0,1]") private Output> zones; /** * @return 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. * */ public Output>> zones() { return Codegen.optional(this.zones); } /** * * @param name The _unique_ name of the resulting resource. */ public Module(java.lang.String name) { this(name, ModuleArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public Module(java.lang.String name, ModuleArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public Module(java.lang.String name, ModuleArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:hsm/module:Module", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Module(java.lang.String name, Output id, @Nullable ModuleState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:hsm/module:Module", name, state, makeResourceOptions(options, id), false); } private static ModuleArgs makeArgs(ModuleArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ModuleArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state * @param options Optional settings to control the behavior of the CustomResource. */ public static Module get(java.lang.String name, Output id, @Nullable ModuleState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Module(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy