Files
floci/docs
Allen Sanborn db182b3048 fix(efs): implement UpdateFileSystemProtection and report protection on describe (#2842)
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.
2026-09-01 10:00:34 -04:00
..
2026-03-15 17:43:56 -05:00