mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 06:00:46 -05:00
AWS::EC2::VPC and AWS::EC2::Subnet (and related networking resources) had no provisioner case, so they fell through to the stub branch: CloudFormation reported CREATE_COMPLETE and exported a fake "logicalId-<random>" physical id, but the subnet was never created in EC2. ec2 describe-subnets did not return it and elbv2 create-load-balancer failed with "The subnet ID '...' does not exist". Inject Ec2Service into CloudFormationResourceProvisioner and add cases for VPC, Subnet, SecurityGroup, InternetGateway, RouteTable, SubnetRouteTableAssociation, Route, NatGateway and EIP. Each delegates to the existing Ec2Service create methods and sets the physical id to the real vpc-/subnet-/... id so Ref/exports resolve to resources EC2 and ELBv2 can use. Topological ordering already guarantees parents are provisioned before children. Adds a CloudFormation+EC2+ELBv2 integration test plus AWS CLI and CDK compatibility coverage. Closes #1297
sdk-test-awscli
Compatibility tests for Floci using the AWS CLI v2 (2.22.35).
Tests are plain bash scripts that call aws CLI commands with --endpoint-url pointed at the emulator.
Services Covered
| Group | Description |
|---|---|
ssm |
Parameter Store — put, get, path, tags |
sqs |
Queues, send/receive/delete, attributes |
sns |
Topics, publish, attributes |
s3 |
Buckets, objects, tagging, copy, delete |
dynamodb |
Tables, put/get/update/query/delete items |
iam |
Users, roles, create/get/delete |
sts |
GetCallerIdentity |
ses |
Identities, sending, quotas, notification attributes |
secretsmanager |
Create/get/put/list/tag/delete secrets |
kms |
Keys, aliases, encrypt/decrypt |
cognito |
User pools, clients |
s3-notifications |
S3 → SQS event notifications |
Requirements
- AWS CLI v2
- bash
- jq
- bats-core (installed via
just setup-awscli)
Running
# All groups (from compatibility-tests/)
just test-awscli
# Run bats directly
./lib/run-bats-with-junit.sh sdk-test-awscli/test/ sdk-test-awscli/test-results/junit.xml
Configuration
| Variable | Default | Description |
|---|---|---|
FLOCI_ENDPOINT |
http://localhost:4566 |
Floci emulator endpoint |
AWS credentials are always test / test / us-east-1.
Docker
docker build -t floci-sdk-awscli .
docker run --rm --network host floci-sdk-awscli
# Custom endpoint (macOS/Windows)
docker run --rm -e FLOCI_ENDPOINT=http://host.docker.internal:4566 floci-sdk-awscli