Files
floci/docs
lex00 5e01c07b33 feat(cloudformation): provision the network ACL family (#2001)
* feat(cloudformation): provision the network ACL family

AWS::EC2::NetworkAcl, NetworkAclEntry (rule number, protocol, action,
egress flag, CIDR, port range), and SubnetNetworkAclAssociation (CFN
semantics: find the subnet's live association and replace it onto the
target ACL) — all mapped onto existing Ec2Service APIs.

Fixes #2000

* refactor(cloudformation): move the network ACL family to a per-service provisioner

Ec2NetworkAclCfnProvisioner serves AWS::EC2::NetworkAcl,
AWS::EC2::NetworkAclEntry and AWS::EC2::SubnetNetworkAclAssociation
through the CfnResourceProvisioner seam, so the three types leave the
switch in CloudFormationResourceProvisioner along with their private
provision methods. The class is CDI-discovered by
CloudFormationResourceRegistry, needs no registration, and injects only
Ec2Service.

delete() now covers all three types, so stack deletion cleans them up
instead of leaking them. The ACL and the entry delegate to Ec2Service;
the subnet association reverts the subnet to its VPC's default ACL,
matching CloudFormation. NotFound is treated as already-deleted so a
retried delete does not fail the stack.

Entry properties resolve through the template engine rather than being
read raw off the JSON, so RuleNumber, Egress and the PortRange bounds
accept intrinsics such as Ref and Fn::Sub like the other properties
already did.

The integration test now deletes the stack and asserts the custom ACL
is gone. A unit test covers the family in isolation with one mocked
service.

* fix(cloudformation): a stack update reuses its network ACL and upserts entries

provisionNetworkAcl called createNetworkAcl unconditionally. CloudFormationService
re-invokes provision with the prior physicalId on UpdateStack, so every update
minted a second ACL, overwrote the id, and orphaned the previous one permanently.
It now reuses the ACL this stack already made, creating only when that one is
absent, and reports an unsupported replacement when VpcId changes, since VpcId is
createOnly. Same shape as EcsCapacityCfnProvisioner.

Fixing that alone broke the entry path: createNetworkAclEntry ran with
replace=false, which raises NetworkAclEntryAlreadyExists for a rule that already
exists. RuleNumber, Egress and NetworkAclId are the createOnly key, so
re-provisioning the same key is an update, and replace=true is correct.

Neither showed up in CI, since no test here ran an UpdateStack. Three now do.

* docs(cloudformation): list the network ACL family in the resource-type table
2026-08-15 18:24:50 -05:00
..
2026-03-15 17:43:56 -05:00