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

com.pulumi.azure.hsm.kotlin.ModuleArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azure.hsm.kotlin

import com.pulumi.azure.hsm.ModuleArgs.builder
import com.pulumi.azure.hsm.kotlin.inputs.ModuleManagementNetworkProfileArgs
import com.pulumi.azure.hsm.kotlin.inputs.ModuleManagementNetworkProfileArgsBuilder
import com.pulumi.azure.hsm.kotlin.inputs.ModuleNetworkProfileArgs
import com.pulumi.azure.hsm.kotlin.inputs.ModuleNetworkProfileArgsBuilder
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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * 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 ([email protected]) to approve. See more details from .
 * > **Note:** If the quota is not enough in some region, please submit the quota request to service team.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
 *     name: "example-vnet",
 *     addressSpaces: ["10.2.0.0/16"],
 *     location: example.location,
 *     resourceGroupName: example.name,
 * });
 * const exampleSubnet = new azure.network.Subnet("example", {
 *     name: "example-compute",
 *     resourceGroupName: example.name,
 *     virtualNetworkName: exampleVirtualNetwork.name,
 *     addressPrefixes: ["10.2.0.0/24"],
 * });
 * const example2 = new azure.network.Subnet("example2", {
 *     name: "example-hsmsubnet",
 *     resourceGroupName: example.name,
 *     virtualNetworkName: exampleVirtualNetwork.name,
 *     addressPrefixes: ["10.2.1.0/24"],
 *     delegations: [{
 *         name: "first",
 *         serviceDelegation: {
 *             name: "Microsoft.HardwareSecurityModules/dedicatedHSMs",
 *             actions: [
 *                 "Microsoft.Network/networkinterfaces/*",
 *                 "Microsoft.Network/virtualNetworks/subnets/join/action",
 *             ],
 *         },
 *     }],
 * });
 * const example3 = new azure.network.Subnet("example3", {
 *     name: "gatewaysubnet",
 *     resourceGroupName: example.name,
 *     virtualNetworkName: exampleVirtualNetwork.name,
 *     addressPrefixes: ["10.2.255.0/26"],
 * });
 * const examplePublicIp = new azure.network.PublicIp("example", {
 *     name: "example-pip",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     allocationMethod: "Dynamic",
 * });
 * const exampleVirtualNetworkGateway = new azure.network.VirtualNetworkGateway("example", {
 *     name: "example-vnetgateway",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     type: "ExpressRoute",
 *     vpnType: "PolicyBased",
 *     sku: "Standard",
 *     ipConfigurations: [{
 *         publicIpAddressId: examplePublicIp.id,
 *         privateIpAddressAllocation: "Dynamic",
 *         subnetId: example3.id,
 *     }],
 * });
 * const exampleModule = new azure.hsm.Module("example", {
 *     name: "example-hsm",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     skuName: "payShield10K_LMK1_CPS60",
 *     managementNetworkProfile: {
 *         networkInterfacePrivateIpAddresses: ["10.2.1.7"],
 *         subnetId: example2.id,
 *     },
 *     networkProfile: {
 *         networkInterfacePrivateIpAddresses: ["10.2.1.8"],
 *         subnetId: example2.id,
 *     },
 *     stampId: "stamp2",
 *     tags: {
 *         env: "Test",
 *     },
 * }, {
 *     dependsOn: [exampleVirtualNetworkGateway],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_virtual_network = azure.network.VirtualNetwork("example",
 *     name="example-vnet",
 *     address_spaces=["10.2.0.0/16"],
 *     location=example.location,
 *     resource_group_name=example.name)
 * example_subnet = azure.network.Subnet("example",
 *     name="example-compute",
 *     resource_group_name=example.name,
 *     virtual_network_name=example_virtual_network.name,
 *     address_prefixes=["10.2.0.0/24"])
 * example2 = azure.network.Subnet("example2",
 *     name="example-hsmsubnet",
 *     resource_group_name=example.name,
 *     virtual_network_name=example_virtual_network.name,
 *     address_prefixes=["10.2.1.0/24"],
 *     delegations=[{
 *         "name": "first",
 *         "service_delegation": {
 *             "name": "Microsoft.HardwareSecurityModules/dedicatedHSMs",
 *             "actions": [
 *                 "Microsoft.Network/networkinterfaces/*",
 *                 "Microsoft.Network/virtualNetworks/subnets/join/action",
 *             ],
 *         },
 *     }])
 * example3 = azure.network.Subnet("example3",
 *     name="gatewaysubnet",
 *     resource_group_name=example.name,
 *     virtual_network_name=example_virtual_network.name,
 *     address_prefixes=["10.2.255.0/26"])
 * example_public_ip = azure.network.PublicIp("example",
 *     name="example-pip",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     allocation_method="Dynamic")
 * example_virtual_network_gateway = azure.network.VirtualNetworkGateway("example",
 *     name="example-vnetgateway",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     type="ExpressRoute",
 *     vpn_type="PolicyBased",
 *     sku="Standard",
 *     ip_configurations=[{
 *         "public_ip_address_id": example_public_ip.id,
 *         "private_ip_address_allocation": "Dynamic",
 *         "subnet_id": example3.id,
 *     }])
 * example_module = azure.hsm.Module("example",
 *     name="example-hsm",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     sku_name="payShield10K_LMK1_CPS60",
 *     management_network_profile={
 *         "network_interface_private_ip_addresses": ["10.2.1.7"],
 *         "subnet_id": example2.id,
 *     },
 *     network_profile={
 *         "network_interface_private_ip_addresses": ["10.2.1.8"],
 *         "subnet_id": example2.id,
 *     },
 *     stamp_id="stamp2",
 *     tags={
 *         "env": "Test",
 *     },
 *     opts = pulumi.ResourceOptions(depends_on=[example_virtual_network_gateway]))
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Azure.Core.ResourceGroup("example", new()
 *     {
 *         Name = "example-resources",
 *         Location = "West Europe",
 *     });
 *     var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("example", new()
 *     {
 *         Name = "example-vnet",
 *         AddressSpaces = new[]
 *         {
 *             "10.2.0.0/16",
 *         },
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *     });
 *     var exampleSubnet = new Azure.Network.Subnet("example", new()
 *     {
 *         Name = "example-compute",
 *         ResourceGroupName = example.Name,
 *         VirtualNetworkName = exampleVirtualNetwork.Name,
 *         AddressPrefixes = new[]
 *         {
 *             "10.2.0.0/24",
 *         },
 *     });
 *     var example2 = new Azure.Network.Subnet("example2", new()
 *     {
 *         Name = "example-hsmsubnet",
 *         ResourceGroupName = example.Name,
 *         VirtualNetworkName = exampleVirtualNetwork.Name,
 *         AddressPrefixes = new[]
 *         {
 *             "10.2.1.0/24",
 *         },
 *         Delegations = new[]
 *         {
 *             new Azure.Network.Inputs.SubnetDelegationArgs
 *             {
 *                 Name = "first",
 *                 ServiceDelegation = new Azure.Network.Inputs.SubnetDelegationServiceDelegationArgs
 *                 {
 *                     Name = "Microsoft.HardwareSecurityModules/dedicatedHSMs",
 *                     Actions = new[]
 *                     {
 *                         "Microsoft.Network/networkinterfaces/*",
 *                         "Microsoft.Network/virtualNetworks/subnets/join/action",
 *                     },
 *                 },
 *             },
 *         },
 *     });
 *     var example3 = new Azure.Network.Subnet("example3", new()
 *     {
 *         Name = "gatewaysubnet",
 *         ResourceGroupName = example.Name,
 *         VirtualNetworkName = exampleVirtualNetwork.Name,
 *         AddressPrefixes = new[]
 *         {
 *             "10.2.255.0/26",
 *         },
 *     });
 *     var examplePublicIp = new Azure.Network.PublicIp("example", new()
 *     {
 *         Name = "example-pip",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         AllocationMethod = "Dynamic",
 *     });
 *     var exampleVirtualNetworkGateway = new Azure.Network.VirtualNetworkGateway("example", new()
 *     {
 *         Name = "example-vnetgateway",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         Type = "ExpressRoute",
 *         VpnType = "PolicyBased",
 *         Sku = "Standard",
 *         IpConfigurations = new[]
 *         {
 *             new Azure.Network.Inputs.VirtualNetworkGatewayIpConfigurationArgs
 *             {
 *                 PublicIpAddressId = examplePublicIp.Id,
 *                 PrivateIpAddressAllocation = "Dynamic",
 *                 SubnetId = example3.Id,
 *             },
 *         },
 *     });
 *     var exampleModule = new Azure.Hsm.Module("example", new()
 *     {
 *         Name = "example-hsm",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         SkuName = "payShield10K_LMK1_CPS60",
 *         ManagementNetworkProfile = new Azure.Hsm.Inputs.ModuleManagementNetworkProfileArgs
 *         {
 *             NetworkInterfacePrivateIpAddresses = new[]
 *             {
 *                 "10.2.1.7",
 *             },
 *             SubnetId = example2.Id,
 *         },
 *         NetworkProfile = new Azure.Hsm.Inputs.ModuleNetworkProfileArgs
 *         {
 *             NetworkInterfacePrivateIpAddresses = new[]
 *             {
 *                 "10.2.1.8",
 *             },
 *             SubnetId = example2.Id,
 *         },
 *         StampId = "stamp2",
 *         Tags =
 *         {
 *             { "env", "Test" },
 *         },
 *     }, new CustomResourceOptions
 *     {
 *         DependsOn =
 *         {
 *             exampleVirtualNetworkGateway,
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/hsm"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("example-resources"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
 * 			Name: pulumi.String("example-vnet"),
 * 			AddressSpaces: pulumi.StringArray{
 * 				pulumi.String("10.2.0.0/16"),
 * 			},
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = network.NewSubnet(ctx, "example", &network.SubnetArgs{
 * 			Name:               pulumi.String("example-compute"),
 * 			ResourceGroupName:  example.Name,
 * 			VirtualNetworkName: exampleVirtualNetwork.Name,
 * 			AddressPrefixes: pulumi.StringArray{
 * 				pulumi.String("10.2.0.0/24"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		example2, err := network.NewSubnet(ctx, "example2", &network.SubnetArgs{
 * 			Name:               pulumi.String("example-hsmsubnet"),
 * 			ResourceGroupName:  example.Name,
 * 			VirtualNetworkName: exampleVirtualNetwork.Name,
 * 			AddressPrefixes: pulumi.StringArray{
 * 				pulumi.String("10.2.1.0/24"),
 * 			},
 * 			Delegations: network.SubnetDelegationArray{
 * 				&network.SubnetDelegationArgs{
 * 					Name: pulumi.String("first"),
 * 					ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
 * 						Name: pulumi.String("Microsoft.HardwareSecurityModules/dedicatedHSMs"),
 * 						Actions: pulumi.StringArray{
 * 							pulumi.String("Microsoft.Network/networkinterfaces/*"),
 * 							pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"),
 * 						},
 * 					},
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		example3, err := network.NewSubnet(ctx, "example3", &network.SubnetArgs{
 * 			Name:               pulumi.String("gatewaysubnet"),
 * 			ResourceGroupName:  example.Name,
 * 			VirtualNetworkName: exampleVirtualNetwork.Name,
 * 			AddressPrefixes: pulumi.StringArray{
 * 				pulumi.String("10.2.255.0/26"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{
 * 			Name:              pulumi.String("example-pip"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			AllocationMethod:  pulumi.String("Dynamic"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleVirtualNetworkGateway, err := network.NewVirtualNetworkGateway(ctx, "example", &network.VirtualNetworkGatewayArgs{
 * 			Name:              pulumi.String("example-vnetgateway"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			Type:              pulumi.String("ExpressRoute"),
 * 			VpnType:           pulumi.String("PolicyBased"),
 * 			Sku:               pulumi.String("Standard"),
 * 			IpConfigurations: network.VirtualNetworkGatewayIpConfigurationArray{
 * 				&network.VirtualNetworkGatewayIpConfigurationArgs{
 * 					PublicIpAddressId:          examplePublicIp.ID(),
 * 					PrivateIpAddressAllocation: pulumi.String("Dynamic"),
 * 					SubnetId:                   example3.ID(),
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = hsm.NewModule(ctx, "example", &hsm.ModuleArgs{
 * 			Name:              pulumi.String("example-hsm"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			SkuName:           pulumi.String("payShield10K_LMK1_CPS60"),
 * 			ManagementNetworkProfile: &hsm.ModuleManagementNetworkProfileArgs{
 * 				NetworkInterfacePrivateIpAddresses: pulumi.StringArray{
 * 					pulumi.String("10.2.1.7"),
 * 				},
 * 				SubnetId: example2.ID(),
 * 			},
 * 			NetworkProfile: &hsm.ModuleNetworkProfileArgs{
 * 				NetworkInterfacePrivateIpAddresses: pulumi.StringArray{
 * 					pulumi.String("10.2.1.8"),
 * 				},
 * 				SubnetId: example2.ID(),
 * 			},
 * 			StampId: pulumi.String("stamp2"),
 * 			Tags: pulumi.StringMap{
 * 				"env": pulumi.String("Test"),
 * 			},
 * 		}, pulumi.DependsOn([]pulumi.Resource{
 * 			exampleVirtualNetworkGateway,
 * 		}))
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * 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("Dynamic")
 *             .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());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleVirtualNetwork:
 *     type: azure:network:VirtualNetwork
 *     name: example
 *     properties:
 *       name: example-vnet
 *       addressSpaces:
 *         - 10.2.0.0/16
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *   exampleSubnet:
 *     type: azure:network:Subnet
 *     name: example
 *     properties:
 *       name: example-compute
 *       resourceGroupName: ${example.name}
 *       virtualNetworkName: ${exampleVirtualNetwork.name}
 *       addressPrefixes:
 *         - 10.2.0.0/24
 *   example2:
 *     type: azure:network:Subnet
 *     properties:
 *       name: example-hsmsubnet
 *       resourceGroupName: ${example.name}
 *       virtualNetworkName: ${exampleVirtualNetwork.name}
 *       addressPrefixes:
 *         - 10.2.1.0/24
 *       delegations:
 *         - name: first
 *           serviceDelegation:
 *             name: Microsoft.HardwareSecurityModules/dedicatedHSMs
 *             actions:
 *               - Microsoft.Network/networkinterfaces/*
 *               - Microsoft.Network/virtualNetworks/subnets/join/action
 *   example3:
 *     type: azure:network:Subnet
 *     properties:
 *       name: gatewaysubnet
 *       resourceGroupName: ${example.name}
 *       virtualNetworkName: ${exampleVirtualNetwork.name}
 *       addressPrefixes:
 *         - 10.2.255.0/26
 *   examplePublicIp:
 *     type: azure:network:PublicIp
 *     name: example
 *     properties:
 *       name: example-pip
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       allocationMethod: Dynamic
 *   exampleVirtualNetworkGateway:
 *     type: azure:network:VirtualNetworkGateway
 *     name: example
 *     properties:
 *       name: example-vnetgateway
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       type: ExpressRoute
 *       vpnType: PolicyBased
 *       sku: Standard
 *       ipConfigurations:
 *         - publicIpAddressId: ${examplePublicIp.id}
 *           privateIpAddressAllocation: Dynamic
 *           subnetId: ${example3.id}
 *   exampleModule:
 *     type: azure:hsm:Module
 *     name: example
 *     properties:
 *       name: example-hsm
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       skuName: payShield10K_LMK1_CPS60
 *       managementNetworkProfile:
 *         networkInterfacePrivateIpAddresses:
 *           - 10.2.1.7
 *         subnetId: ${example2.id}
 *       networkProfile:
 *         networkInterfacePrivateIpAddresses:
 *           - 10.2.1.8
 *         subnetId: ${example2.id}
 *       stampId: stamp2
 *       tags:
 *         env: Test
 *     options:
 *       dependson:
 *         - ${exampleVirtualNetworkGateway}
 * ```
 * 
 * ## 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
 * ```
 * @property location The Azure Region where the Dedicated Hardware Security Module should exist. Changing this forces a new Dedicated Hardware Security Module to be created.
 * @property managementNetworkProfile 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`.
 * @property name The name which should be used for this Dedicated Hardware Security Module. Changing this forces a new Dedicated Hardware Security Module to be created.
 * @property networkProfile A `network_profile` block as defined below.
 * @property resourceGroupName 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.
 * @property skuName 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.
 * @property stampId The ID of the stamp. Possible values are `stamp1` or `stamp2`. Changing this forces a new Dedicated Hardware Security Module to be created.
 * @property tags A mapping of tags which should be assigned to the Dedicated Hardware Security Module.
 * @property zones 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 data class ModuleArgs(
    public val location: Output? = null,
    public val managementNetworkProfile: Output? = null,
    public val name: Output? = null,
    public val networkProfile: Output? = null,
    public val resourceGroupName: Output? = null,
    public val skuName: Output? = null,
    public val stampId: Output? = null,
    public val tags: Output>? = null,
    public val zones: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.hsm.ModuleArgs = com.pulumi.azure.hsm.ModuleArgs.builder()
        .location(location?.applyValue({ args0 -> args0 }))
        .managementNetworkProfile(
            managementNetworkProfile?.applyValue({ args0 ->
                args0.let({ args0 ->
                    args0.toJava()
                })
            }),
        )
        .name(name?.applyValue({ args0 -> args0 }))
        .networkProfile(networkProfile?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
        .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
        .skuName(skuName?.applyValue({ args0 -> args0 }))
        .stampId(stampId?.applyValue({ args0 -> args0 }))
        .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
        .zones(zones?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [ModuleArgs].
 */
@PulumiTagMarker
public class ModuleArgsBuilder internal constructor() {
    private var location: Output? = null

    private var managementNetworkProfile: Output? = null

    private var name: Output? = null

    private var networkProfile: Output? = null

    private var resourceGroupName: Output? = null

    private var skuName: Output? = null

    private var stampId: Output? = null

    private var tags: Output>? = null

    private var zones: Output>? = null

    /**
     * @param value The Azure Region where the Dedicated Hardware Security Module should exist. Changing this forces a new Dedicated Hardware Security Module to be created.
     */
    @JvmName("qopbicpcnkvjpuuf")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value 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`.
     */
    @JvmName("vqetboxbvkcsahqr")
    public suspend fun managementNetworkProfile(`value`: Output) {
        this.managementNetworkProfile = value
    }

    /**
     * @param value The name which should be used for this Dedicated Hardware Security Module. Changing this forces a new Dedicated Hardware Security Module to be created.
     */
    @JvmName("lgebqexpvssggarl")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value A `network_profile` block as defined below.
     */
    @JvmName("nfmepbcaqpqienqi")
    public suspend fun networkProfile(`value`: Output) {
        this.networkProfile = value
    }

    /**
     * @param value 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.
     */
    @JvmName("lokgpqebuhwkjjdk")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value 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.
     */
    @JvmName("yybamkkunqepxfxl")
    public suspend fun skuName(`value`: Output) {
        this.skuName = value
    }

    /**
     * @param value The ID of the stamp. Possible values are `stamp1` or `stamp2`. Changing this forces a new Dedicated Hardware Security Module to be created.
     */
    @JvmName("npsyrsooykbcickf")
    public suspend fun stampId(`value`: Output) {
        this.stampId = value
    }

    /**
     * @param value A mapping of tags which should be assigned to the Dedicated Hardware Security Module.
     */
    @JvmName("upukksiqvykleben")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value 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.
     */
    @JvmName("slobcdsgcpfxcsfs")
    public suspend fun zones(`value`: Output>) {
        this.zones = value
    }

    @JvmName("egkyblvhqqfwyhai")
    public suspend fun zones(vararg values: Output) {
        this.zones = Output.all(values.asList())
    }

    /**
     * @param values 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.
     */
    @JvmName("eoaryxidyesaifsp")
    public suspend fun zones(values: List>) {
        this.zones = Output.all(values)
    }

    /**
     * @param value The Azure Region where the Dedicated Hardware Security Module should exist. Changing this forces a new Dedicated Hardware Security Module to be created.
     */
    @JvmName("kmehldqhyvbyjabl")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value 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`.
     */
    @JvmName("qfjhslhyuglnmdev")
    public suspend fun managementNetworkProfile(`value`: ModuleManagementNetworkProfileArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.managementNetworkProfile = mapped
    }

    /**
     * @param argument 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`.
     */
    @JvmName("sssmnaswddcwhgsp")
    public suspend fun managementNetworkProfile(argument: suspend ModuleManagementNetworkProfileArgsBuilder.() -> Unit) {
        val toBeMapped = ModuleManagementNetworkProfileArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.managementNetworkProfile = mapped
    }

    /**
     * @param value The name which should be used for this Dedicated Hardware Security Module. Changing this forces a new Dedicated Hardware Security Module to be created.
     */
    @JvmName("igrkytpkvejmwewe")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value A `network_profile` block as defined below.
     */
    @JvmName("accwkjykxcnxljoa")
    public suspend fun networkProfile(`value`: ModuleNetworkProfileArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkProfile = mapped
    }

    /**
     * @param argument A `network_profile` block as defined below.
     */
    @JvmName("myutfryjoxixwcia")
    public suspend fun networkProfile(argument: suspend ModuleNetworkProfileArgsBuilder.() -> Unit) {
        val toBeMapped = ModuleNetworkProfileArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.networkProfile = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("ahwkpxhefvxwkgyx")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("nivtkoywhcitkhcm")
    public suspend fun skuName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.skuName = mapped
    }

    /**
     * @param value The ID of the stamp. Possible values are `stamp1` or `stamp2`. Changing this forces a new Dedicated Hardware Security Module to be created.
     */
    @JvmName("selhijjvlxnwoahm")
    public suspend fun stampId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.stampId = mapped
    }

    /**
     * @param value A mapping of tags which should be assigned to the Dedicated Hardware Security Module.
     */
    @JvmName("wufnqitpwwadsdux")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A mapping of tags which should be assigned to the Dedicated Hardware Security Module.
     */
    @JvmName("rdpkxqgxunlohyqu")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("mnycisveupkohjwo")
    public suspend fun zones(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.zones = mapped
    }

    /**
     * @param values 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.
     */
    @JvmName("kmjakctbvovnmntb")
    public suspend fun zones(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.zones = mapped
    }

    internal fun build(): ModuleArgs = ModuleArgs(
        location = location,
        managementNetworkProfile = managementNetworkProfile,
        name = name,
        networkProfile = networkProfile,
        resourceGroupName = resourceGroupName,
        skuName = skuName,
        stampId = stampId,
        tags = tags,
        zones = zones,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy