mirror of
https://github.com/floci-io/floci.git
synced 2026-11-22 21:50:46 -05:00
A file system's replication overwrite protection was missing in two ways that
compound: the operation that sets it did not exist, and the field that reports
it never reached the wire.
UpdateFileSystemProtection had no route, so the terraform AWS provider's PUT to
/2015-02-01/file-systems/{id}/protection fell through to the S3 handler and came
back as an XML error body, which the SDK reported as "deserialization failed,
invalid character '<'". Every consumer of gruntwork's terraform-aws-data-storage
EFS module hits this rather than only those who opt in, because the module emits
the aws_efs_file_system `protection` block unconditionally.
Separately, protection was never reported. createFileSystem left the field null,
and FileSystem's accessor was named getFileSystemProtectionDescription() -- the
*shape* name. Under UpperCamelCaseStrategy the accessor name is the JSON key, so
even a populated field would have gone out as FileSystemProtectionDescription
rather than the member name FileSystemProtection that FileSystemDescription
actually declares.
So:
- add UpdateFileSystemProtection (PUT .../{FileSystemId}/protection), returning
FileSystemProtectionDescription, 404 for an unknown file system
- default new file systems to ENABLED, which is what AWS documents
- apply that default on read as well, so file systems in a store written before
protection was modelled describe the same as one created today
- rename the accessor to getFileSystemProtection()/setFileSystemProtection()
Authority: efs/2015-02-01/service-2.json -- operations.UpdateFileSystemProtection,
shapes.FileSystemDescription.members.FileSystemProtection.
Verified three ways: EfsIntegrationTest 13/13; a real AWS SDK round trip
(create -> describe reports ENABLED -> update DISABLED -> describe reports
DISABLED), which only passes if the wire names match the model; and
terraform-aws-data-storage/examples/efs, previously FLOCI_UNIMPLEMENTED at
apply, now OK through destroy.
1.7 KiB
1.7 KiB
Elastic File System (EFS)
Protocol: REST JSON
Endpoint: http://localhost:4566/2015-02-01/...
The EFS emulator provides a metadata control plane for file systems, mount targets, access points, and policies across the 2015-02-01 API.
Supported Operations
| Action | Description |
|---|---|
CreateFileSystem |
- |
DescribeFileSystems |
- |
UpdateFileSystem |
- |
UpdateFileSystemProtection |
- |
DeleteFileSystem |
- |
CreateTags |
- |
DescribeTags |
- |
DeleteTags |
- |
TagResource |
- |
UntagResource |
- |
ListTagsForResource |
- |
CreateMountTarget |
- |
DescribeMountTargets |
- |
DeleteMountTarget |
- |
DescribeMountTargetSecurityGroups |
- |
ModifyMountTargetSecurityGroups |
- |
CreateAccessPoint |
- |
DescribeAccessPoints |
- |
DeleteAccessPoint |
- |
PutFileSystemPolicy |
- |
DescribeFileSystemPolicy |
- |
DeleteFileSystemPolicy |
- |
PutBackupPolicy |
- |
DescribeBackupPolicy |
- |
PutLifecycleConfiguration |
- |
DescribeLifecycleConfiguration |
- |
Limitations
- Metadata Only: Floci provides an EFS API simulation (the control plane) so you can provision file systems for your ECS tasks and Lambda functions. It does not provide an actual NFSv4.1 data plane endpoint. Reading or writing files via standard file-system mounts will fail.
- Lifecycle Evaluation: Lifecycle policies are saved but no background worker evaluates them to move data across storage classes. Transition fields will remain static.
- Backup: Backup policies are recorded, but Floci does not currently interface with the AWS Backup emulator to generate real snapshot resources.