amazon-web-services - 重用现有资源作为cloudformation中的参数

标签 amazon-web-services amazon-ec2 aws-cloudformation devops

我想创建重用现有资源的 cloudfomation 模板,例如我想创建一个新实例并将其附加到现有负载均衡器,并且我想在下拉列表中从现有负载均衡器中选择负载均衡器。

有没有办法制作cloudformation模板来显示现有资源并重用它?

最佳答案

您无法在下拉列表中列出负载均衡器,因为它在 AWS 特定参数类型中不可用。

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html#aws-specific-parameter-types

但您可以使用 aws Fn::ImportValue 导入现有负载均衡器值。

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-importvalue.html

关于amazon-web-services - 重用现有资源作为cloudformation中的参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58164032/

相关文章:

terraform - Terraform 中的 VPCGatewayAttachment?

amazon-web-services - 地形 : Specifying the working directory when running terraform apply/plan

ios - AWS SDK swift com.amazonaws.AWSSNSErrorDomain Code=0 "(null)"

amazon-web-services - 有没有办法在 Amazon Neptune Graph 的边缘存储更多信息?

google-app-engine - 就我而言,迁移Google App Engine(GAE)的最佳托管选项?

ssl - "Public key certificate and private key doesn' t match"当使用Godaddy颁发的证书

amazon-web-services - 如何下载通过 CloudFormation 创建的 IoT 证书?

python - 带有 Lambda 自定义资源的 Cloudformation 错误 - Python

amazon-web-services - 在 SageMaker 中隐藏 key (环境变量?)

amazon-web-services - 响应然后继续使用 AWS Lambda/API Gateway?