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);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:
- Cluster
Id string The ID of Cloud HSM v2 cluster to which HSM will be added.
- Availability
Zone string The IDs of AZ in which HSM module will be located. Do not use together with subnet_id.
- Ip
Address string The IP address of HSM module. Must be within the CIDR of selected subnet.
- Subnet
Id string The ID of subnet in which HSM module will be located.
- Cluster
Id string The ID of Cloud HSM v2 cluster to which HSM will be added.
- Availability
Zone string The IDs of AZ in which HSM module will be located. Do not use together with subnet_id.
- Ip
Address string The IP address of HSM module. Must be within the CIDR of selected subnet.
- Subnet
Id string The ID of subnet in which HSM module will be located.
- cluster
Id string The ID of Cloud HSM v2 cluster to which HSM will be added.
- availability
Zone string The IDs of AZ in which HSM module will be located. Do not use together with subnet_id.
- ip
Address string The IP address of HSM module. Must be within the CIDR of selected subnet.
- subnet
Id 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:
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): Hsmstatic 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);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:
- Availability
Zone string The IDs of AZ in which HSM module will be located. Do not use together with subnet_id.
- Cluster
Id string The ID of Cloud HSM v2 cluster to which HSM will be added.
- Hsm
Eni stringId The id of the ENI interface allocated for HSM module.
- Hsm
Id string The id of the HSM module.
- Ip
Address string The IP address of HSM module. Must be within the CIDR of selected subnet.
- State string
The state of the HSM module.
- Subnet
Id string The ID of subnet in which HSM module will be located.
- Availability
Zone string The IDs of AZ in which HSM module will be located. Do not use together with subnet_id.
- Cluster
Id string The ID of Cloud HSM v2 cluster to which HSM will be added.
- Hsm
Eni stringId The id of the ENI interface allocated for HSM module.
- Hsm
Id string The id of the HSM module.
- Hsm
State string The state of the HSM module.
- Ip
Address string The IP address of HSM module. Must be within the CIDR of selected subnet.
- Subnet
Id string The ID of subnet in which HSM module will be located.
- availability
Zone string The IDs of AZ in which HSM module will be located. Do not use together with subnet_id.
- cluster
Id string The ID of Cloud HSM v2 cluster to which HSM will be added.
- hsm
Eni stringId The id of the ENI interface allocated for HSM module.
- hsm
Id string The id of the HSM module.
- hsm
State string The state of the HSM module.
- ip
Address string The IP address of HSM module. Must be within the CIDR of selected subnet.
- subnet
Id 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_ strid 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
awsTerraform Provider.