Resource: aws_cloudhsm_v2_hsm

Creates an HSM module in Amazon CloudHSM v2 cluster.

Example Usage

The following example below creates an HSM module in CloudHSM cluster.

data "aws_cloudhsm_v2_cluster" "cluster" {
  cluster_id = var.cloudhsm_cluster_id
}

resource "aws_cloudhsm_v2_hsm" "cloudhsm_v2_hsm" {
  subnet_id  = data.aws_cloudhsm_v2_cluster.cluster.subnet_ids[0]
  cluster_id = data.aws_cloudhsm_v2_cluster.cluster.cluster_id
}

Argument Reference

This resource supports the following arguments:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import HSM modules using their HSM ID. For example:

import {
  to = aws_cloudhsm_v2_hsm.bar
  id = "hsm-quo8dahtaca"
}

Using terraform import, import HSM modules using their HSM ID. For example:

% terraform import aws_cloudhsm_v2_hsm.bar hsm-quo8dahtaca