为 CloudHSM 启动 CF 模板时出错

Error while launching CF Template for CloudHSM

{
    "Resources": {
        "Cluster": {
            "Type" : "AWS::CloudHSM::Cluster",
            "Properties":{
            "VpcId": "vpc-50ae0636",
            "SubnetMapping": {
                "us-west-1b": "subnet-49a1bc00",
                "us-west-1c": "subnet-6f950334",
                "us-west-1a": "subnet-fd54af9b"
            },
            "SecurityGroup": "sg-6cb2c216",
            "HsmType": "hsm1.medium",
            "Certificates": {},
            "State": "CREATE_IN_PROGRESS",
            "Hsms": [],
            }
        }
    }
}

我正在尝试使用 CF 模板在 CloudHSM 中启动集群。我正面临这个问题。 "Template format error: Unrecognized resource types: [AWS::HSM::Cluster]"

CloudFormation 当前不支持 CloudHSM。
您可以找到支持的服务和资源类型列表 here

AWS::CloudHSM::Cluster 不是有效的资源类型。不幸的是,Cloudformation 并不支持所有服务,或者可能有一组不完整的受支持资源。

以下是 CloudFormation 当前支持的有效服务和资源类型的列表:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html

Cloudformation 团队非常频繁地推出对新资源的支持。您可以监视此页面以查看他们何时推出对新功能的支持: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/ReleaseHistory.html

截至目前,CloudHSM 无法通过 CF 完成。 https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/cloudhsmv2.html#CloudHSMV2.Client.create_cluster.

可以通过自定义资源完成,这是通过使用 Lambda 完成的。或 CLI。

https://docs.aws.amazon.com/cli/latest/reference/cloudhsmv2/index.html