Files
floci/src/test/resources/cloudformation/getatt-attribute-gaps.tsv
T
Alessandro Lattao 95bf6df474 feat(dsql): add Aurora DSQL's control plane and AWS::DSQL::Cluster (#6048)
* feat(dsql): add Aurora DSQL's control plane and AWS::DSQL::Cluster

The first half of #6014. Aurora DSQL's REST JSON control plane, with
the answers measured on AWS (eu-west-1): CreateCluster, GetCluster,
ListClusters, UpdateCluster, DeleteCluster, GetVpcEndpointServiceName,
the cluster policy calls and tagging on cluster ARNs. Identifiers are 26
characters of lowercase base32 as DSQL's are, and malformed or unknown
ones are refused with DSQL's messages; a cluster created without
deletionProtectionEnabled is protected, and deleting a protected one is
refused. CreateCluster answers CREATING and the cluster is ACTIVE right
after.

AWS::DSQL::Cluster waits for ACTIVE, returns the identifier from Ref
and Identifier, ResourceArn, Status, CreationTime, Endpoint, VpcEndpoint
and VpcEndpointServiceName through Fn::GetAtt, and a protected cluster
makes the stack's deletion fail, as on AWS.

A cluster has no database behind it here: its endpoint is named as on
AWS, <id>.dsql.<region>.localhost.floci.io, but not served. Serving it
is the second half of #6014, its own pull request.

* fix(dsql): answer the control plane's edge cases as DSQL does

Review of #6048, each answer measured on DSQL (eu-west-1) first:
- ListClusters carries on from a page token whose cluster was deleted
  in between, as AWS does: the token now holds the sort position of the
  next page's first cluster rather than its identifier.
- deletionProtectionEnabled is read as DSQL reads it: text is false
  when it spells false in any case and true otherwise; empty text, a
  number, an object and a list fail with SerializationException.
- The tag calls refuse another account's cluster ARN with 403
  AccessDeniedException instead of reading it in the caller's account.
- A client token reused with other parameters answers 409
  ConflictException; with the same ones, the earlier cluster.
- AWS_OWNED_KMS_KEY names AWS's own key on create and update.

AWS::DSQL::Cluster reads DeletionProtectionEnabled and PolicyDocument
with AWS::NoValue as left out, and an update that drops the
multi-Region properties clears them, as it already reset the key and
deletion protection. ListTagsForResource copies the tags under the
cluster's lock, and a cluster's lock goes with the cluster.

* fix(dsql): answer errors, policies, updates and multi-Region clusters as DSQL does

A review asked for the attribute coverage, the reason ValidationException
carries, a real untag assertion and tests of the stack-update path.
Measuring them on DSQL (eu-west-1, 2026-10-20) found more that did not
match, fixed here too.

- Attributes are written with resource.getAttributes().put, which the
  schema coverage test reads; EncryptionDetails, an object an output
  refuses on AWS, is recorded as a gap.
- DSQL leaves reason out of its model-validation errors. Only the page
  token's refusal carries it, with fieldList naming next-token and its
  own text. maxResults no longer quotes the value.
- Tag calls answer what DSQL answers: 403 for an ARN that is not a
  cluster ARN, 400 BadRequestException for another Region's, 404
  NotFoundException for no cluster. The 403s name the caller.
- Policy versions are epoch milliseconds, DeleteClusterPolicy answers
  the deleted version, and the missing-policy and stale-version errors
  carry DSQL's texts and resourceType.
- Policies are checked and kept as DSQL does: its three refusal texts,
  a service principal, a principal that names no one, a public grant,
  and the lockout check when both policy actions are denied to the
  caller, unless bypassPolicyLockoutSafetyCheck. The kept form is
  Jackson's pretty printer in DSQL's element order, with condition
  operators and keys in HashMap order, as measured.
- The public check shares its condition keys with Lambda web functions
  through PublicAccessConditions, and S3 now takes its fixed-value and
  SourceIp range tests from there. Sharing the whole rule was tried and
  dropped: DSQL was measured to treat some operators otherwise than
  LambdaWeb's and S3's rules do (ForAnyValue:, ArnLike "*",
  StringEquals "*"), so the operator rules stay per service. The
  lockout check is IamPolicyEvaluator's.
- A multi-Region cluster is PENDING_SETUP and lists itself until it and
  each peer name one another, then ACTIVE; its deletion answers
  PENDING_DELETE.
- AWS::DSQL::Cluster reads its properties through CfnPropertyTypes, so
  a PolicyDocument object or DeletionProtectionEnabled "yes" fails as
  on AWS, where Boolean.valueOf made "yes" false. An update leaves a
  property the template no longer sets as it was, deletion protection,
  KMS key and multi-Region alike, and removes only the tags and the
  policy; an earlier change put them back to their defaults, which was
  not measured and is not what CloudFormation does. A policy the
  template does not change keeps its version, and create settles on
  PENDING_SETUP too.

DsqlServiceTest, DsqlClusterPoliciesTest and DsqlCfnProvisionerTest
cover these in isolation, the integration tests over the wire.

* fix(dsql): keep the public access rule to DSQL and forget a deleted policy's version

A review asked to leave S3 and Lambda web functions out of this change,
and pointed at DSQL's own block public access page. The shared helper
is dropped and S3 and Lambda web functions are as on main; folding
their copies into one helper belongs to a separate change.

DSQL now has its own keys: the trusted ones its page lists, and
aws:SourceIp, aws:SourceVpcArn and the three aws:Vpce* keys, which the
page leaves out but DSQL accepts (measured, eu-west-1, 2026-10-20). As
the page says, a policy variable never restricts: StringEquals with
${aws:PrincipalArn}, ${aws:SourceVpc} or a role/${aws:username} ARN is
public on DSQL. ArnEquals reads like ArnLike, as IAM matches both the
same way, so a value that is no ARN, ${aws:SourceArn} among them,
matches nothing and restricts, as measured.

DeleteClusterPolicy left the deleted version on the cluster, so a put
naming it went through; it is now cleared, and a put that names a
version on a cluster with no policy is refused as not found.
2026-10-20 15:34:39 -04:00

7.3 KiB

1AWS::AppSync::GraphQLApiGraphQLEndpointArnthe private-endpoint ARN of the GraphQL endpoint; Floci serves one public endpoint and has no private-endpoint model
2AWS::BedrockAgentCore::RuntimeWorkloadIdentityDetailsthe dotted WorkloadIdentityDetails.WorkloadIdentityArn is set instead, the form AWS's GetAtt exposes for the nested object
3AWS::CodeBuild::ProjectIdschema gives no description; AWS's Id may differ from the project name Floci uses
4AWS::CodePipeline::CustomActionTypeIdschema gives no description; the custom action has no separate id in Floci
5AWS::CodePipeline::WebhookIdschema gives no description; Floci keys webhooks by name
6AWS::EC2::InstanceStatethe dotted State.Code and State.Name are set instead, the form AWS's GetAtt exposes for the nested State object
7AWS::EC2::NatGatewayAutoProvisionZonesavailability-mode NAT gateways are not emulated
8AWS::EC2::NatGatewayAutoScalingIpsavailability-mode NAT gateways are not emulated
9AWS::EC2::NatGatewayEniIdthe NAT gateway's network interface is not created
10AWS::EC2::NatGatewayRouteTableIdavailability-mode NAT gateways are not emulated
11AWS::EC2::SubnetBlockPublicAccessStatesVPC block public access is not emulated
12AWS::EC2::SubnetIpv6CidrBlocksIPv6 CIDR association is not emulated
13AWS::EC2::SubnetNetworkAclAssociationIdthe subnet's default network ACL association is not created with the subnet
14AWS::EC2::VPCEndpointNetworkInterfaceIdsendpoint ENIs are not created
15AWS::EC2::VPCGatewayAttachmentAttachmentTypethe exact literal AWS returns (internet vs vpn gateway) is not given by the schema
16AWS::Kinesis::StreamWarmThroughputObjectwarm throughput is not an emulated Kinesis feature
17AWS::Lambda::MicrovmImageCreatedAtmicrovm image lifecycle fields are not tracked
18AWS::Lambda::MicrovmImageLatestFailedImageVersionfailure history is not tracked
19AWS::Lambda::MicrovmImageStatemicrovm image state is not modelled
20AWS::Lambda::MicrovmImageUpdatedAtmicrovm image lifecycle fields are not tracked
21AWS::Lambda::NetworkConnectorStatenetwork connector state is not modelled
22AWS::Lambda::WebFunctionEndpointRegionalEndpointsthe attribute is a map of per-region state, and Floci GetAtt values are strings; the endpoint's own State and UpdateStatus carry the same values
23AWS::Lambda::PermissionIdschema gives no description and AWS's value is unclear; the physical id is a composite functionName|statementId
24AWS::Pipes::PipeCreationTimepipe lifecycle timestamps are not tracked
25AWS::Pipes::PipeCurrentStatepipe state transitions are not modelled
26AWS::Pipes::PipeLastModifiedTimepipe lifecycle timestamps are not tracked
27AWS::Pipes::PipeStateReasonpipe state transitions are not modelled
28AWS::RDS::DBClusterEndpointthe dotted Endpoint.Address and Endpoint.Port are set instead, which is the form AWS's GetAtt actually exposes
29AWS::RDS::DBClusterReadEndpointReadEndpoint.Address is set instead, the form AWS's GetAtt exposes
30AWS::RDS::DBClusterStorageEncryptionTypecluster storage encryption is not emulated
31AWS::RDS::DBClusterStorageThroughputprovisioned storage throughput is not emulated
32AWS::RDS::DBInstanceAutomaticRestartTimeinstance restart scheduling is not emulated
33AWS::RDS::DBInstanceCertificateDetailsper-instance CA certificate metadata is not emulated
34AWS::RDS::DBInstanceDBInstanceStatusthe model carries no lifecycle status; instances reach available synchronously
35AWS::RDS::DBInstanceInstanceCreateTimecreation timestamps are not recorded on the instance
36AWS::RDS::DBInstanceIsStorageConfigUpgradeAvailablestorage configuration upgrades are not emulated
37AWS::RDS::DBInstanceLatestRestorableTimepoint-in-time restore windows are not emulated
38AWS::RDS::DBInstanceListenerEndpointthe SQL Server listener endpoint is not emulated
39AWS::RDS::DBInstancePercentProgressno asynchronous progress to report; instances reach available synchronously
40AWS::RDS::DBInstanceReadReplicaDBClusterIdentifiersread replicas are not emulated
41AWS::RDS::DBInstanceReadReplicaDBInstanceIdentifiersread replicas are not emulated
42AWS::RDS::DBInstanceResumeFullAutomationModeTimeRDS Custom automation mode is not emulated
43AWS::RDS::DBInstanceSecondaryAvailabilityZonemulti-AZ secondary placement is not emulated
44AWS::RDS::DBInstanceStatusInfosread-replica status detail is not emulated
45AWS::RDS::DBInstanceStorageOperationPercentProgressstorage operations (scaling, type changes) are not emulated; storage changes apply synchronously
46AWS::RDS::DBInstanceStorageOperationStatusstorage operations (scaling, type changes) are not emulated; storage changes apply synchronously
47AWS::Redshift::ClusterDeferMaintenanceIdentifierFloci does not emulate deferred maintenance windows
48AWS::RedshiftServerless::NamespaceNamespacethe whole Namespace object has no scalar GetAtt form; its members are set under the dotted Namespace.* attributes instead, the form AWS's GetAtt exposes
49AWS::SQS::QueuePolicyIdschema gives no description; the policy has no backing entity to take an id from
50AWS::Transfer::ServerAs2ServiceManagedEgressIpAddressesAS2 managed egress IP allocation is not emulated by the Transfer management-plane service
51AWS::SecretsManager::SecretIdFn::GetAtt Id on a secret is its ARN, which the provisioner already sets as the physical id and as Arn; closable, deferred to a follow-up PR to keep this one a pure move
52AWS::EKS::ClusterClusterSecurityGroupIdnot modeled: Floci does not create a cluster security group, so there is no id to publish
53AWS::EKS::ClusterEncryptionConfigKeyArnnot modeled: Floci does not apply envelope encryption, so no KMS key arn is resolved
54AWS::EKS::ClusterIdnot modeled: Floci identifies a cluster by its Name (the primary identifier and Ref), not a separate Id
55AWS::ElastiCache::CacheClusterConfigurationEndpointthe whole object has no scalar GetAtt form; its members are set under the dotted ConfigurationEndpoint.* attributes, the form AWS GetAtt exposes (memcached only)
56AWS::ElastiCache::CacheClusterRedisEndpointthe whole object has no scalar GetAtt form; its members are set under the dotted RedisEndpoint.* attributes, the form AWS GetAtt exposes (redis and valkey only)
57AWS::IAM::PolicyIdnot published: Floci uses the policy name for Ref, AWS returns an opaque generated identifier that Floci does not model
58AWS::IAM::ManagedPolicyAttachmentCountnot published: the attachment count is dynamic and Floci does not expose it as a stable Fn::GetAtt value
59AWS::IAM::ManagedPolicyCreateDatenot published: Floci does not surface the policy create date as an Fn::GetAtt value
60AWS::IAM::ManagedPolicyIsAttachablenot modeled: Floci does not track policy attachability
61AWS::IAM::ManagedPolicyPermissionsBoundaryUsageCountnot modeled: Floci does not track permissions-boundary usage
62AWS::IAM::ManagedPolicyUpdateDatenot published: Floci does not surface the policy update date as an Fn::GetAtt value
63AWS::Lambda::FunctionSnapStartResponsenot modeled: Floci does not emulate Lambda SnapStart, so it exposes no ApplyOn/OptimizationStatus response
64AWS::CloudFormation::CustomResourceIdnot published: Id is the primary identifier returned by Ref (the physical resource id); Floci does not expose it as a separate Fn::GetAtt attribute