hsm

package
v3.50.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

type Module struct {
	pulumi.CustomResourceState

	// The Azure Region where the Dedicated Hardware Security Module should exist. Changing this forces a new Dedicated Hardware Security Module to be created.
	Location pulumi.StringOutput `pulumi:"location"`
	// The name which should be used for this Dedicated Hardware Security Module. Changing this forces a new Dedicated Hardware Security Module to be created.
	Name pulumi.StringOutput `pulumi:"name"`
	// A `networkProfile` block as defined below.
	NetworkProfile ModuleNetworkProfileOutput `pulumi:"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.
	ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
	// The sku name of the dedicated hardware security module. Changing this forces a new Dedicated Hardware Security Module to be created.
	SkuName pulumi.StringOutput `pulumi:"skuName"`
	// The ID of the stamp. Possible values are `stamp1` or `stamp2`. Changing this forces a new Dedicated Hardware Security Module to be created.
	StampId pulumi.StringPtrOutput `pulumi:"stampId"`
	// A mapping of tags which should be assigned to the Dedicated Hardware Security Module.
	Tags pulumi.StringMapOutput `pulumi:"tags"`
	// The Dedicated Hardware Security Module zones. Changing this forces a new Dedicated Hardware Security Module to be created.
	Zones pulumi.StringArrayOutput `pulumi:"zones"`
}

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/en-us/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

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/hsm"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/network"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "exampleVirtualNetwork", &network.VirtualNetworkArgs{
			AddressSpaces: pulumi.StringArray{
				pulumi.String("10.2.0.0/16"),
			},
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
		})
		if err != nil {
			return err
		}
		_, err = network.NewSubnet(ctx, "exampleSubnet", &network.SubnetArgs{
			ResourceGroupName:  exampleResourceGroup.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{
			ResourceGroupName:  exampleResourceGroup.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{
			ResourceGroupName:  exampleResourceGroup.Name,
			VirtualNetworkName: exampleVirtualNetwork.Name,
			AddressPrefixes: pulumi.StringArray{
				pulumi.String("10.2.255.0/26"),
			},
		})
		if err != nil {
			return err
		}
		examplePublicIp, err := network.NewPublicIp(ctx, "examplePublicIp", &network.PublicIpArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
			AllocationMethod:  pulumi.String("Dynamic"),
		})
		if err != nil {
			return err
		}
		exampleVirtualNetworkGateway, err := network.NewVirtualNetworkGateway(ctx, "exampleVirtualNetworkGateway", &network.VirtualNetworkGatewayArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.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, "exampleModule", &hsm.ModuleArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
			SkuName:           pulumi.String("SafeNet Luna Network HSM A790"),
			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
	})
}

```

## 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

```

func GetModule

func GetModule(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ModuleState, opts ...pulumi.ResourceOption) (*Module, error)

GetModule gets an existing Module resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewModule

func NewModule(ctx *pulumi.Context,
	name string, args *ModuleArgs, opts ...pulumi.ResourceOption) (*Module, error)

NewModule registers a new resource with the given unique name, arguments, and options.

func (*Module) ElementType added in v3.31.1

func (*Module) ElementType() reflect.Type

func (*Module) ToModuleOutput added in v3.31.1

func (i *Module) ToModuleOutput() ModuleOutput

func (*Module) ToModuleOutputWithContext added in v3.31.1

func (i *Module) ToModuleOutputWithContext(ctx context.Context) ModuleOutput

func (*Module) ToModulePtrOutput added in v3.47.1

func (i *Module) ToModulePtrOutput() ModulePtrOutput

func (*Module) ToModulePtrOutputWithContext added in v3.47.1

func (i *Module) ToModulePtrOutputWithContext(ctx context.Context) ModulePtrOutput

type ModuleArgs

type ModuleArgs struct {
	// The Azure Region where the Dedicated Hardware Security Module should exist. Changing this forces a new Dedicated Hardware Security Module to be created.
	Location pulumi.StringPtrInput
	// The name which should be used for this Dedicated Hardware Security Module. Changing this forces a new Dedicated Hardware Security Module to be created.
	Name pulumi.StringPtrInput
	// A `networkProfile` block as defined below.
	NetworkProfile ModuleNetworkProfileInput
	// 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.
	ResourceGroupName pulumi.StringInput
	// The sku name of the dedicated hardware security module. Changing this forces a new Dedicated Hardware Security Module to be created.
	SkuName pulumi.StringInput
	// The ID of the stamp. Possible values are `stamp1` or `stamp2`. Changing this forces a new Dedicated Hardware Security Module to be created.
	StampId pulumi.StringPtrInput
	// A mapping of tags which should be assigned to the Dedicated Hardware Security Module.
	Tags pulumi.StringMapInput
	// The Dedicated Hardware Security Module zones. Changing this forces a new Dedicated Hardware Security Module to be created.
	Zones pulumi.StringArrayInput
}

The set of arguments for constructing a Module resource.

func (ModuleArgs) ElementType

func (ModuleArgs) ElementType() reflect.Type

type ModuleArray added in v3.47.1

type ModuleArray []ModuleInput

func (ModuleArray) ElementType added in v3.47.1

func (ModuleArray) ElementType() reflect.Type

func (ModuleArray) ToModuleArrayOutput added in v3.47.1

func (i ModuleArray) ToModuleArrayOutput() ModuleArrayOutput

func (ModuleArray) ToModuleArrayOutputWithContext added in v3.47.1

func (i ModuleArray) ToModuleArrayOutputWithContext(ctx context.Context) ModuleArrayOutput

type ModuleArrayInput added in v3.47.1

type ModuleArrayInput interface {
	pulumi.Input

	ToModuleArrayOutput() ModuleArrayOutput
	ToModuleArrayOutputWithContext(context.Context) ModuleArrayOutput
}

ModuleArrayInput is an input type that accepts ModuleArray and ModuleArrayOutput values. You can construct a concrete instance of `ModuleArrayInput` via:

ModuleArray{ ModuleArgs{...} }

type ModuleArrayOutput added in v3.47.1

type ModuleArrayOutput struct{ *pulumi.OutputState }

func (ModuleArrayOutput) ElementType added in v3.47.1

func (ModuleArrayOutput) ElementType() reflect.Type

func (ModuleArrayOutput) Index added in v3.47.1

func (ModuleArrayOutput) ToModuleArrayOutput added in v3.47.1

func (o ModuleArrayOutput) ToModuleArrayOutput() ModuleArrayOutput

func (ModuleArrayOutput) ToModuleArrayOutputWithContext added in v3.47.1

func (o ModuleArrayOutput) ToModuleArrayOutputWithContext(ctx context.Context) ModuleArrayOutput

type ModuleInput added in v3.31.1

type ModuleInput interface {
	pulumi.Input

	ToModuleOutput() ModuleOutput
	ToModuleOutputWithContext(ctx context.Context) ModuleOutput
}

type ModuleMap added in v3.47.1

type ModuleMap map[string]ModuleInput

func (ModuleMap) ElementType added in v3.47.1

func (ModuleMap) ElementType() reflect.Type

func (ModuleMap) ToModuleMapOutput added in v3.47.1

func (i ModuleMap) ToModuleMapOutput() ModuleMapOutput

func (ModuleMap) ToModuleMapOutputWithContext added in v3.47.1

func (i ModuleMap) ToModuleMapOutputWithContext(ctx context.Context) ModuleMapOutput

type ModuleMapInput added in v3.47.1

type ModuleMapInput interface {
	pulumi.Input

	ToModuleMapOutput() ModuleMapOutput
	ToModuleMapOutputWithContext(context.Context) ModuleMapOutput
}

ModuleMapInput is an input type that accepts ModuleMap and ModuleMapOutput values. You can construct a concrete instance of `ModuleMapInput` via:

ModuleMap{ "key": ModuleArgs{...} }

type ModuleMapOutput added in v3.47.1

type ModuleMapOutput struct{ *pulumi.OutputState }

func (ModuleMapOutput) ElementType added in v3.47.1

func (ModuleMapOutput) ElementType() reflect.Type

func (ModuleMapOutput) MapIndex added in v3.47.1

func (ModuleMapOutput) ToModuleMapOutput added in v3.47.1

func (o ModuleMapOutput) ToModuleMapOutput() ModuleMapOutput

func (ModuleMapOutput) ToModuleMapOutputWithContext added in v3.47.1

func (o ModuleMapOutput) ToModuleMapOutputWithContext(ctx context.Context) ModuleMapOutput

type ModuleNetworkProfile

type ModuleNetworkProfile struct {
	// The private IPv4 address of the network interface. Changing this forces a new Dedicated Hardware Security Module to be created.
	NetworkInterfacePrivateIpAddresses []string `pulumi:"networkInterfacePrivateIpAddresses"`
	// The ID of the subnet. Changing this forces a new Dedicated Hardware Security Module to be created.
	SubnetId string `pulumi:"subnetId"`
}

type ModuleNetworkProfileArgs

type ModuleNetworkProfileArgs struct {
	// The private IPv4 address of the network interface. Changing this forces a new Dedicated Hardware Security Module to be created.
	NetworkInterfacePrivateIpAddresses pulumi.StringArrayInput `pulumi:"networkInterfacePrivateIpAddresses"`
	// The ID of the subnet. Changing this forces a new Dedicated Hardware Security Module to be created.
	SubnetId pulumi.StringInput `pulumi:"subnetId"`
}

func (ModuleNetworkProfileArgs) ElementType

func (ModuleNetworkProfileArgs) ElementType() reflect.Type

func (ModuleNetworkProfileArgs) ToModuleNetworkProfileOutput

func (i ModuleNetworkProfileArgs) ToModuleNetworkProfileOutput() ModuleNetworkProfileOutput

func (ModuleNetworkProfileArgs) ToModuleNetworkProfileOutputWithContext

func (i ModuleNetworkProfileArgs) ToModuleNetworkProfileOutputWithContext(ctx context.Context) ModuleNetworkProfileOutput

func (ModuleNetworkProfileArgs) ToModuleNetworkProfilePtrOutput

func (i ModuleNetworkProfileArgs) ToModuleNetworkProfilePtrOutput() ModuleNetworkProfilePtrOutput

func (ModuleNetworkProfileArgs) ToModuleNetworkProfilePtrOutputWithContext

func (i ModuleNetworkProfileArgs) ToModuleNetworkProfilePtrOutputWithContext(ctx context.Context) ModuleNetworkProfilePtrOutput

type ModuleNetworkProfileInput

type ModuleNetworkProfileInput interface {
	pulumi.Input

	ToModuleNetworkProfileOutput() ModuleNetworkProfileOutput
	ToModuleNetworkProfileOutputWithContext(context.Context) ModuleNetworkProfileOutput
}

ModuleNetworkProfileInput is an input type that accepts ModuleNetworkProfileArgs and ModuleNetworkProfileOutput values. You can construct a concrete instance of `ModuleNetworkProfileInput` via:

ModuleNetworkProfileArgs{...}

type ModuleNetworkProfileOutput

type ModuleNetworkProfileOutput struct{ *pulumi.OutputState }

func (ModuleNetworkProfileOutput) ElementType

func (ModuleNetworkProfileOutput) ElementType() reflect.Type

func (ModuleNetworkProfileOutput) NetworkInterfacePrivateIpAddresses

func (o ModuleNetworkProfileOutput) NetworkInterfacePrivateIpAddresses() pulumi.StringArrayOutput

The private IPv4 address of the network interface. Changing this forces a new Dedicated Hardware Security Module to be created.

func (ModuleNetworkProfileOutput) SubnetId

The ID of the subnet. Changing this forces a new Dedicated Hardware Security Module to be created.

func (ModuleNetworkProfileOutput) ToModuleNetworkProfileOutput

func (o ModuleNetworkProfileOutput) ToModuleNetworkProfileOutput() ModuleNetworkProfileOutput

func (ModuleNetworkProfileOutput) ToModuleNetworkProfileOutputWithContext

func (o ModuleNetworkProfileOutput) ToModuleNetworkProfileOutputWithContext(ctx context.Context) ModuleNetworkProfileOutput

func (ModuleNetworkProfileOutput) ToModuleNetworkProfilePtrOutput

func (o ModuleNetworkProfileOutput) ToModuleNetworkProfilePtrOutput() ModuleNetworkProfilePtrOutput

func (ModuleNetworkProfileOutput) ToModuleNetworkProfilePtrOutputWithContext

func (o ModuleNetworkProfileOutput) ToModuleNetworkProfilePtrOutputWithContext(ctx context.Context) ModuleNetworkProfilePtrOutput

type ModuleNetworkProfilePtrInput

type ModuleNetworkProfilePtrInput interface {
	pulumi.Input

	ToModuleNetworkProfilePtrOutput() ModuleNetworkProfilePtrOutput
	ToModuleNetworkProfilePtrOutputWithContext(context.Context) ModuleNetworkProfilePtrOutput
}

ModuleNetworkProfilePtrInput is an input type that accepts ModuleNetworkProfileArgs, ModuleNetworkProfilePtr and ModuleNetworkProfilePtrOutput values. You can construct a concrete instance of `ModuleNetworkProfilePtrInput` via:

        ModuleNetworkProfileArgs{...}

or:

        nil

type ModuleNetworkProfilePtrOutput

type ModuleNetworkProfilePtrOutput struct{ *pulumi.OutputState }

func (ModuleNetworkProfilePtrOutput) Elem

func (ModuleNetworkProfilePtrOutput) ElementType

func (ModuleNetworkProfilePtrOutput) NetworkInterfacePrivateIpAddresses

func (o ModuleNetworkProfilePtrOutput) NetworkInterfacePrivateIpAddresses() pulumi.StringArrayOutput

The private IPv4 address of the network interface. Changing this forces a new Dedicated Hardware Security Module to be created.

func (ModuleNetworkProfilePtrOutput) SubnetId

The ID of the subnet. Changing this forces a new Dedicated Hardware Security Module to be created.

func (ModuleNetworkProfilePtrOutput) ToModuleNetworkProfilePtrOutput

func (o ModuleNetworkProfilePtrOutput) ToModuleNetworkProfilePtrOutput() ModuleNetworkProfilePtrOutput

func (ModuleNetworkProfilePtrOutput) ToModuleNetworkProfilePtrOutputWithContext

func (o ModuleNetworkProfilePtrOutput) ToModuleNetworkProfilePtrOutputWithContext(ctx context.Context) ModuleNetworkProfilePtrOutput

type ModuleOutput added in v3.31.1

type ModuleOutput struct {
	*pulumi.OutputState
}

func (ModuleOutput) ElementType added in v3.31.1

func (ModuleOutput) ElementType() reflect.Type

func (ModuleOutput) ToModuleOutput added in v3.31.1

func (o ModuleOutput) ToModuleOutput() ModuleOutput

func (ModuleOutput) ToModuleOutputWithContext added in v3.31.1

func (o ModuleOutput) ToModuleOutputWithContext(ctx context.Context) ModuleOutput

func (ModuleOutput) ToModulePtrOutput added in v3.47.1

func (o ModuleOutput) ToModulePtrOutput() ModulePtrOutput

func (ModuleOutput) ToModulePtrOutputWithContext added in v3.47.1

func (o ModuleOutput) ToModulePtrOutputWithContext(ctx context.Context) ModulePtrOutput

type ModulePtrInput added in v3.47.1

type ModulePtrInput interface {
	pulumi.Input

	ToModulePtrOutput() ModulePtrOutput
	ToModulePtrOutputWithContext(ctx context.Context) ModulePtrOutput
}

type ModulePtrOutput added in v3.47.1

type ModulePtrOutput struct {
	*pulumi.OutputState
}

func (ModulePtrOutput) ElementType added in v3.47.1

func (ModulePtrOutput) ElementType() reflect.Type

func (ModulePtrOutput) ToModulePtrOutput added in v3.47.1

func (o ModulePtrOutput) ToModulePtrOutput() ModulePtrOutput

func (ModulePtrOutput) ToModulePtrOutputWithContext added in v3.47.1

func (o ModulePtrOutput) ToModulePtrOutputWithContext(ctx context.Context) ModulePtrOutput

type ModuleState

type ModuleState struct {
	// The Azure Region where the Dedicated Hardware Security Module should exist. Changing this forces a new Dedicated Hardware Security Module to be created.
	Location pulumi.StringPtrInput
	// The name which should be used for this Dedicated Hardware Security Module. Changing this forces a new Dedicated Hardware Security Module to be created.
	Name pulumi.StringPtrInput
	// A `networkProfile` block as defined below.
	NetworkProfile ModuleNetworkProfilePtrInput
	// 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.
	ResourceGroupName pulumi.StringPtrInput
	// The sku name of the dedicated hardware security module. Changing this forces a new Dedicated Hardware Security Module to be created.
	SkuName pulumi.StringPtrInput
	// The ID of the stamp. Possible values are `stamp1` or `stamp2`. Changing this forces a new Dedicated Hardware Security Module to be created.
	StampId pulumi.StringPtrInput
	// A mapping of tags which should be assigned to the Dedicated Hardware Security Module.
	Tags pulumi.StringMapInput
	// The Dedicated Hardware Security Module zones. Changing this forces a new Dedicated Hardware Security Module to be created.
	Zones pulumi.StringArrayInput
}

func (ModuleState) ElementType

func (ModuleState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL