diff --git a/cmd/ftl-provisioner-cloudformation/provisioner.go b/cmd/ftl-provisioner-cloudformation/provisioner.go index 79e3f4c3f4..c7260316d7 100644 --- a/cmd/ftl-provisioner-cloudformation/provisioner.go +++ b/cmd/ftl-provisioner-cloudformation/provisioner.go @@ -11,6 +11,7 @@ import ( "connectrpc.com/connect" "github.com/aws/aws-sdk-go-v2/service/cloudformation" goformation "github.com/awslabs/goformation/v7/cloudformation" + cf "github.com/awslabs/goformation/v7/cloudformation/cloudformation" "github.com/awslabs/goformation/v7/cloudformation/rds" "github.com/awslabs/goformation/v7/cloudformation/tags" "golang.org/x/text/cases" @@ -118,6 +119,10 @@ func (c *CloudformationProvisioner) createTemplate(req *provisioner.ProvisionReq return "", err } } + // Stack can not be empty, insert a null resource to keep the stack around + if len(req.DesiredResources) == 0 { + template.Resources["NullResource"] = &cf.WaitConditionHandle{} + } bytes, err := template.JSON() if err != nil {