Hsm

Creates an HSM module in Amazon CloudHSM v2 cluster.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var cluster = Output.Create(Aws.CloudHsmV2.GetCluster.InvokeAsync(new Aws.CloudHsmV2.GetClusterArgs
        {
            ClusterId = @var.Cloudhsm_cluster_id,
        }));
        var cloudhsmV2Hsm = new Aws.CloudHsmV2.Hsm("cloudhsmV2Hsm", new Aws.CloudHsmV2.HsmArgs
        {
            ClusterId = cluster.Apply(cluster => cluster.ClusterId),
            SubnetId = cluster.Apply(cluster => cluster.SubnetIds[0]),
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/cloudhsmv2"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        cluster, err := cloudhsmv2.LookupCluster(ctx, &cloudhsmv2.LookupClusterArgs{
            ClusterId: _var.Cloudhsm_cluster_id,
        }, nil)
        if err != nil {
            return err
        }
        _, err = cloudhsmv2.NewHsm(ctx, "cloudhsmV2Hsm", &cloudhsmv2.HsmArgs{
            ClusterId: pulumi.String(cluster.ClusterId),
            SubnetId:  pulumi.String(cluster.SubnetIds[0]),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

cluster = aws.cloudhsmv2.get_cluster(cluster_id=var["cloudhsm_cluster_id"])
cloudhsm_v2_hsm = aws.cloudhsmv2.Hsm("cloudhsmV2Hsm",
    cluster_id=cluster.cluster_id,
    subnet_id=cluster.subnet_ids[0])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const cluster = pulumi.output(aws.cloudhsmv2.getCluster({
    clusterId: var_cloudhsm_cluster_id,
}, { async: true }));
const cloudhsmV2Hsm = new aws.cloudhsmv2.Hsm("cloudhsm_v2_hsm", {
    clusterId: cluster.clusterId,
    subnetId: cluster.apply(cluster => cluster.subnetIds[0]),
});

Create a Hsm Resource

new Hsm(name: string, args: HsmArgs, opts?: CustomResourceOptions);
def Hsm(resource_name, opts=None, availability_zone=None, cluster_id=None, ip_address=None, subnet_id=None, __props__=None);
func NewHsm(ctx *Context, name string, args HsmArgs, opts ...ResourceOption) (*Hsm, error)
public Hsm(string name, HsmArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args HsmArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args HsmArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args HsmArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Hsm Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Hsm resource accepts the following input properties:

ClusterId string

The ID of Cloud HSM v2 cluster to which HSM will be added.

AvailabilityZone string

The IDs of AZ in which HSM module will be located. Do not use together with subnet_id.

IpAddress string

The IP address of HSM module. Must be within the CIDR of selected subnet.

SubnetId string

The ID of subnet in which HSM module will be located.

ClusterId string

The ID of Cloud HSM v2 cluster to which HSM will be added.

AvailabilityZone string

The IDs of AZ in which HSM module will be located. Do not use together with subnet_id.

IpAddress string

The IP address of HSM module. Must be within the CIDR of selected subnet.

SubnetId string

The ID of subnet in which HSM module will be located.

clusterId string

The ID of Cloud HSM v2 cluster to which HSM will be added.

availabilityZone string

The IDs of AZ in which HSM module will be located. Do not use together with subnet_id.

ipAddress string

The IP address of HSM module. Must be within the CIDR of selected subnet.

subnetId string

The ID of subnet in which HSM module will be located.

cluster_id str

The ID of Cloud HSM v2 cluster to which HSM will be added.

availability_zone str

The IDs of AZ in which HSM module will be located. Do not use together with subnet_id.

ip_address str

The IP address of HSM module. Must be within the CIDR of selected subnet.

subnet_id str

The ID of subnet in which HSM module will be located.

Outputs

All input properties are implicitly available as output properties. Additionally, the Hsm resource produces the following output properties:

HsmEniId string

The id of the ENI interface allocated for HSM module.

HsmId string

The id of the HSM module.

Id string
The provider-assigned unique ID for this managed resource.
State string

The state of the HSM module.

HsmEniId string

The id of the ENI interface allocated for HSM module.

HsmId string

The id of the HSM module.

HsmState string

The state of the HSM module.

Id string
The provider-assigned unique ID for this managed resource.
hsmEniId string

The id of the ENI interface allocated for HSM module.

hsmId string

The id of the HSM module.

hsmState string

The state of the HSM module.

id string
The provider-assigned unique ID for this managed resource.
hsm_eni_id str

The id of the ENI interface allocated for HSM module.

hsm_id str

The id of the HSM module.

hsm_state str

The state of the HSM module.

id str
The provider-assigned unique ID for this managed resource.

Look up an Existing Hsm Resource

Get an existing Hsm resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: HsmState, opts?: CustomResourceOptions): Hsm
static get(resource_name, id, opts=None, availability_zone=None, cluster_id=None, hsm_eni_id=None, hsm_id=None, hsm_state=None, ip_address=None, subnet_id=None, __props__=None);
func GetHsm(ctx *Context, name string, id IDInput, state *HsmState, opts ...ResourceOption) (*Hsm, error)
public static Hsm Get(string name, Input<string> id, HsmState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

AvailabilityZone string

The IDs of AZ in which HSM module will be located. Do not use together with subnet_id.

ClusterId string

The ID of Cloud HSM v2 cluster to which HSM will be added.

HsmEniId string

The id of the ENI interface allocated for HSM module.

HsmId string

The id of the HSM module.

IpAddress string

The IP address of HSM module. Must be within the CIDR of selected subnet.

State string

The state of the HSM module.

SubnetId string

The ID of subnet in which HSM module will be located.

AvailabilityZone string

The IDs of AZ in which HSM module will be located. Do not use together with subnet_id.

ClusterId string

The ID of Cloud HSM v2 cluster to which HSM will be added.

HsmEniId string

The id of the ENI interface allocated for HSM module.

HsmId string

The id of the HSM module.

HsmState string

The state of the HSM module.

IpAddress string

The IP address of HSM module. Must be within the CIDR of selected subnet.

SubnetId string

The ID of subnet in which HSM module will be located.

availabilityZone string

The IDs of AZ in which HSM module will be located. Do not use together with subnet_id.

clusterId string

The ID of Cloud HSM v2 cluster to which HSM will be added.

hsmEniId string

The id of the ENI interface allocated for HSM module.

hsmId string

The id of the HSM module.

hsmState string

The state of the HSM module.

ipAddress string

The IP address of HSM module. Must be within the CIDR of selected subnet.

subnetId string

The ID of subnet in which HSM module will be located.

availability_zone str

The IDs of AZ in which HSM module will be located. Do not use together with subnet_id.

cluster_id str

The ID of Cloud HSM v2 cluster to which HSM will be added.

hsm_eni_id str

The id of the ENI interface allocated for HSM module.

hsm_id str

The id of the HSM module.

hsm_state str

The state of the HSM module.

ip_address str

The IP address of HSM module. Must be within the CIDR of selected subnet.

subnet_id str

The ID of subnet in which HSM module will be located.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.