我添加了CloudFormation设置文件vpc.yml
和front.yml
,导出vpc.yml
中的一些值并导入它们。
我运行了以下命令,但它不起作用。
$ aws cloudformation validate-template --template-body file://front.yml
An error occurred (ValidationError) when calling the ValidateTemplate operation: Template format error: Unresolved resource dependencies [VPCGatewayAttach] in the Resources block of the template
堆栈从其他堆栈导入值的有效命令是什么?
最佳答案
您收到的错误是因为您在指定依赖于 VPCGatewayAttach
的资源之一中具有 dependsOn
属性,但 VPCGatewayAttach
不存在在你的 cft 中。
关于amazon-web-services - 如何验证或创建 CloudFormation 堆栈,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47489321/