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

Amazon cloudformation 如何正确地将EFS文件系统ID传递给cloudformation模板?,amazon-cloudformation,amazon-efs,Amazon Cloudformation,Amazon Efs,在将EFS卷ID传递到cloudformation模板时,我很难理解为什么这不起作用: Parameters: EFSFileSystem: Description: EFS file system to mount Type: AWS::EFS::FileSystem::Id 这也不起作用: Parameters: EFSFileSystem: Description: EFS file system to mount

在将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
我得到一个错误:

参数名EFSFileSystem的参数类型AWS::EFS::FileSystem::Id不存在

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


是否应该将类型设置为AWS::EFS::FileSystem::Id?AWS::EFS::FileSystem::Id没有资源类型。只有文件系统资源类型。如果将参数传递到cloudformation并设置“类型”,则设置的参数类型只能是字符串、数字、列表、CommaDelimitedList。Cloudformation将验证输入的值是否匹配这些类型之一,而不是Cloudformation资源类型

Cloudformation资源类型是可以在AWS中创建的“东西”。参数类型是“什么”,您期望的值是多少?这就是为什么它使用类型String传递fs-xxxxxxx值的原因


Fo,很好奇您是否找到了一种方法,可以将文件系统ID作为参数传递,而不只是发送字符串值?这是很久以前的事了,我不记得使用了什么解决方案,但我很少再使用CloudFormation,而是选择terraform
Parameters:
    EFSFileSystem:
        Description: EFS file system to mount
        Type: String