如何正确地将 EFS 文件系统 ID 传递给 cloudformation 模板?
How to correctly pass EFS FileSystem ID to cloudformation template?
我无法弄清楚为什么在将 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 的资源类型。只有一个 FileSystem 资源类型。如果您将参数传递到您的 cloudformation 并设置 'Type',则您设置的参数类型只能是 String、Number、List、CommaDelimitedList。 Cloudformation 将验证输入的值是否匹配其中一种类型,而不是 Cloudformation 资源类型。
Cloudformation 资源类型是您可以在 AWS 中创建的 'thing'。一个参数 Type 是 'what' 的值是你期望的吗?这就是为什么使用 Type String 它传递 fs-xxxxxxx 值的原因。
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html
我无法弄清楚为什么在将 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 的资源类型。只有一个 FileSystem 资源类型。如果您将参数传递到您的 cloudformation 并设置 'Type',则您设置的参数类型只能是 String、Number、List、CommaDelimitedList。 Cloudformation 将验证输入的值是否匹配其中一种类型,而不是 Cloudformation 资源类型。
Cloudformation 资源类型是您可以在 AWS 中创建的 'thing'。一个参数 Type 是 'what' 的值是你期望的吗?这就是为什么使用 Type String 它传递 fs-xxxxxxx 值的原因。
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html