Problem creating ECS cluster using cloud formation #1082
|
Hi Floci team, We’re trying to provision a simulated ECS cluster through CloudFormation in Floci, but it looks like AWS::ECS::Cluster is currently accepted as a CloudFormation resource without creating a cluster that ECS APIs can use. Environment: Floci image floci/floci:latest, Floci version 1.5.19, image digest floci/floci@sha256:e981a5afd790ec30e3670f1ef823cf2b7b9384c75cd4f234a75d8f1125d34ee6, region eu-west-1, Docker socket mounted, FLOCI_SERVICES_ECS_DOCKER_NETWORK configured for the Docker Compose network. Minimal reproduction: ./bin/floci cloudformation create-stack --stack-name floci-ecs-cfn-report --template-body '{"AWSTemplateFormatVersion":"2010-09-09","Resources":{"Cluster":{"Type":"AWS::ECS::Cluster","Properties":{"ClusterName":"floci-ecs-cfn-report"}}},"Outputs":{"ClusterRef":{"Value":{"Ref":"Cluster"}}}}' ./bin/floci cloudformation wait stack-create-complete --stack-name floci-ecs-cfn-report ./bin/floci cloudformation describe-stack-resources --stack-name floci-ecs-cfn-report Observed behavior: CloudFormation reports CREATE_COMPLETE for the AWS::ECS::Cluster resource and returns a synthetic physical id like Cluster-b1fe876a. However, ECS does not see the cluster. Running ./bin/floci ecs list-clusters does not include floci-ecs-cfn-report, and both ./bin/floci ecs describe-clusters --clusters floci-ecs-cfn-report and ./bin/floci ecs describe-clusters --clusters Cluster-b1fe876a return empty clusters. Expected behavior: creating an AWS::ECS::Cluster via CloudFormation should have the same side effect as calling CreateCluster, so the cluster should appear in ecs list-clusters and be usable with RegisterTaskDefinition / RunTask. Direct ECS API cluster creation works for us, so our current workaround is to provision S3/SQS/DynamoDB through CloudFormation but create the ECS cluster separately via CreateCluster. Question: is AWS::ECS::Cluster intended to be supported as a real side-effecting CloudFormation resource in Floci, or is it currently metadata-only/synthetic? If it is intended to work, is there a different template shape or property set we should use? |
Replies: 2 comments
|
Hi @javafanboy, Thanks for sharing the details. I will take a look deeper. Cloud formation had still a lot of gaps. I will identify the issues listed here and I will get a ticket for each of them. Thanks |
|
This looks fixed in current Floci. I re-ran your exact reproduction against
Fix: pull a newer image ( |
This looks fixed in current Floci. I re-ran your exact reproduction against
floci/floci:2.2.0(regioneu-west-1):AWS::ECS::Clusteris now backed by a real provisioner (EcsCfnProvisioner), so the cluster shows up inlist-clusters/describe-clusters, andRefreturns the cluster name i…