gpt4 book ai didi

aws-cloudformation - 如何正确将EFS文件系统ID传递给cloudformation模板?

转载 作者:行者123 更新时间:2023-12-03 07:19:33 24 4
gpt4 key购买 nike

我无法弄清楚为什么在将 EFS 卷 ID 传递到 cloudformation 模板时不起作用:

Parameters:
EFSFileSystem:
Description: EFS file system to mount
Type: AWS::EFS::FileSystem::Id

这也不起作用:

Parameters:
EFSFileSystem:
Description: EFS file system to mount
Type: AWS::EFS::FileSystem

我收到错误:

parameter type AWS::EFS::FileSystem::Id for parameter name EFSFileSystem does not exist

但这确实传递了 ID (fs-xxxxxxx):

Parameters:
EFSFileSystem:
Description: EFS file system to mount
Type: String

不应该将类型设置为 AWS::EFS::FileSystem::Id 吗?

最佳答案

没有 AWS::EFS::FileSystem::Id 资源类型。仅文件系统资源类型。如果您将参数传递到云信息中并设置了“类型”,则您设置的参数类型只能是字符串、数字、列表、逗号分隔列表。 Cloudformation 将验证输入的值是否与这些类型之一匹配,而不是与 Cloudformation 资源类型匹配。

Cloudformation 资源类型是您可以在 AWS 中创建的“事物”。参数类型是您期望的值是什么?这就是为什么 Type String 会传递 fs-xxxxxxx 值。

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html

关于aws-cloudformation - 如何正确将EFS文件系统ID传递给cloudformation模板?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43641193/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com