amazon-web-services - 如何列出当前部署到 AWS 账户的所有堆栈输出

标签 amazon-web-services aws-cloudformation

我目前拥有三个 cloudformation 堆栈:

  1. kms 堆栈
  2. vpc 堆栈
  3. sqs-stack

它们都导出我在描述该堆栈时可以看到的输出,但是当我运行时:

aws cloudformation list-exports

仅将 vpc 堆栈的输出打印到 CLI。

最佳答案

堆栈的输出和堆栈的导出不是一回事。

堆栈的输出在输出部分中指定。如果需要,还可以导出输出中包含的每个元素。导出在一个地区内必须是唯一的。

aws cloudformation list-exports 

将列出区域内所有堆栈的所有导出值;

因此,请检查每个堆栈的 cloudformation 脚本,并确定您是否真正导出所需的值。

在以下 VPC 示例中,将导出 VPC id; IGW 不会,尽管两者都会显示在描述堆栈中:

Outputs:
  VPC:
    Value:
      Ref: VPC
    Export:
      Name: MyVpcID
  InternetGateway:
    Value:
      Ref: InternetGateway

关于amazon-web-services - 如何列出当前部署到 AWS 账户的所有堆栈输出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49301783/

相关文章:

amazon-web-services - 通过cloudformation创建VPC时的子网问题

amazon-web-services - 在 AWS CloudFormation 中构造参数

powershell - 无法使用 Cloudformation 安装 codedeploy-agent.msi

amazon-web-services - 如何使用 CF 正确配置 Route53 HealthCheck 警报(悉尼)

amazon-web-services - 使用 Lenses 捕获多个异常

javascript - 如何仅获取 dynamoDB 流上的差异/修改

amazon-web-services - AWS Cloudformation 定义 Cloudfront 的安全策略

amazon-web-services - go and dynamo 从表中的字段和字段不为空/字段不为空的表中获取数据

amazon-web-services - 在 CFN 资源提供程序测试中创建 S3 存储桶时出现 IllegalLocationConstraintException

aws-cloudformation - 云信息 : How to append properties to a pre-defined bucket?