小编Mar*_*ani的帖子

CloudFormation:如何获取给定区域中的密钥对列表

我有一个非常简单的 CF 模板,用于创建 EC2 实例。密钥对被指定为参数。我希望自动填充可能的密钥对列表。

Resources:
  MyInstance:
    Type: AWS::EC2::Instance
    Properties:
      AvailabilityZone: eu-west-2a
      ImageId: ami-0e80a462ede03e653
      InstanceType: t3.nano
      KeyName: !Ref SSHKey

Parameters:
  SSHKey:
    Type: String
    Description: name of the key pair to ssh into the instance
    AllowedValues:
      # populate automatically
Run Code Online (Sandbox Code Playgroud)

如何使用 CloudFormation 检索部署模板的区域中的密钥对列表?

amazon-cloudformation

3
推荐指数
1
解决办法
1436
查看次数

标签 统计

amazon-cloudformation ×1