代码之家  ›  专栏  ›  技术社区  ›  Sam Hammamy

AWS SSM参数存储与CloudFormation

  •  4
  • Sam Hammamy  · 技术社区  · 7 年前

    从CFN文档中,我可以看到我可以创建一个 AWS::SSM::Parameter KMS Master Key

    然而 type SSM:Parameter 文档页面中没有列出 secure string

    有没有一种方法可以在cloudformation模板中执行以下操作:

    1) create KMS Key
    2) use KMS key to encrypt a param
    3) pull that param in User-Data for an EC2 instance
    

    我将使用Jenkins密码参数中的param值从Jenkins作业运行CFN模板。我也可以设置 "NoEcho": true 在模板的参数上,这样它就不会在CloudFormation控制台中回响。

    2 回复  |  直到 7 年前
        1
  •  1
  •   ekcrisp    6 年前

    https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html

    {{resolve:ssm-secure:parameter-name:version}} Fn::Join CF固有。

    截至2019年4月,安全字符串在cloudformation模板中不可用作参数类型,但文档表明 CloudFormation will support the Parameter Store ‘SecureString’ type in a later release.

    https://aws.amazon.com/blogs/mt/integrating-aws-cloudformation-with-aws-systems-manager-parameter-store/

        2
  •  0
  •   Sam Hammamy    7 年前

    似乎有一种方法可以使用 custom resource