{"id":36494667,"url":"https://github.com/rbalman/cfn-compose","last_synced_at":"2026-01-12T01:59:51.283Z","repository":{"id":65071810,"uuid":"503997370","full_name":"rbalman/cfn-compose","owner":"rbalman","description":"compose your cloudformation stacks like docker compose","archived":false,"fork":false,"pushed_at":"2023-06-19T18:00:34.000Z","size":27669,"stargazers_count":42,"open_issues_count":13,"forks_count":11,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-06-20T17:53:05.022Z","etag":null,"topics":["aws","cloudformation","golang","iac","orchestration"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rbalman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-16T03:22:12.000Z","updated_at":"2023-05-25T15:17:43.000Z","dependencies_parsed_at":"2024-06-20T17:33:01.922Z","dependency_job_id":"3adf5a36-296f-43b9-94b8-065099e3def1","html_url":"https://github.com/rbalman/cfn-compose","commit_stats":null,"previous_names":["balmanrawat/cfn-compose"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/rbalman/cfn-compose","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbalman%2Fcfn-compose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbalman%2Fcfn-compose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbalman%2Fcfn-compose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbalman%2Fcfn-compose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rbalman","download_url":"https://codeload.github.com/rbalman/cfn-compose/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbalman%2Fcfn-compose/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28331497,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"ssl_error","status_checked_at":"2026-01-12T00:36:15.229Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","cloudformation","golang","iac","orchestration"],"created_at":"2026-01-12T01:59:51.219Z","updated_at":"2026-01-12T01:59:51.275Z","avatar_url":"https://github.com/rbalman.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Go Report Card](https://goreportcard.com/badge/github.com/rbalman/cfn-compose)](https://goreportcard.com/report/github.com/rbalman/cfn-compose)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=cfn-compose\u0026metric=coverage)](https://sonarcloud.io/summary/new_code?id=cfn-compose)\n[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=cfn-compose\u0026metric=code_smells)](https://sonarcloud.io/summary/new_code?id=cfn-compose)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=cfn-compose\u0026metric=security_rating)](https://sonarcloud.io/summary/new_code?id=cfn-compose)\n[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=cfn-compose\u0026metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=cfn-compose)\n[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=cfn-compose\u0026metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=cfn-compose)\n\n# cfnc\n\nA command-line tool for managing CloudFormation Stacks at scale.\n\n## Features\n\n- Create/Update/Delete multiple CloudFormation stacks in parallel or sequentially\n- Customize the CloudFormation stacks dependency using yaml config\n- Delete multiple CloudFormation stacks respecting the creation sequence\n- DryRun mode to plan the change\n- Generate/Validate/visualize configuration with ease\n- Supports Go Template for dynamic value substitution\n\nhttps://user-images.githubusercontent.com/8892649/216241617-9aef4f3c-2981-4b36-a4da-41eec0e6b1e7.mp4/\n\n## Overview\n\nAs infrastructure grows more complex, managing multiple CloudFormation Stacks becomes a challenge. Typically, actions such as creating, updating, or deleting stacks are performed on a single stack at a time. In addition deleting stacks in a development or testing environment can be cumbersome because we usually want to destroy whole environment and to do that stacks must be deleted in the reverse order of creation. \n\n`cfn-compose` offers a solution to this problem by providing a way to manage multiple, related stacks using a declarative yaml language, making the process easier and more streamlined. For more details please go through the rest of the Readme.\n\n![overview image](./docs/images/overview.png)\n\n## Installation\nBinary is available for Linux, Windows and Mac OS (amd64 and arm64). Download the binary for your respective platform from the [releases page](https://github.com/rbalman/cfn-compose/releases).\n\n#### Using go cli\n```shell\ngo install github.com/rbalman/cfn-compose@latest\n```\n\n\n## Limitations\n* Supports limited CFN attributes\n* No Retry Mechanism\n* No Configurable concurrency. One Go routine is spun for every flow.\n* One compose file can have max `50` flows and each flow can have up to `50 stacks`. This is by design, to limit stacks in a compose file.\n\n\n## Usage\n\n```shell\n➜ cfnc --help\nManage cloudformation stacks at scale. Design and deploy multiple cloudformation stacks either in sequence or in parallel using declarative configuration\n\nUsage:\n  cfnc [command]\n\nAvailable Commands:\n  completion  Generate the autocompletion script for the specified shell\n  config      Generate, validate and visualize the compose configuration\n  deploy      Deploys the stacks based on the sequence specified in the compose configuration\n  destroy     Destroys all the stacks in the reverse order of creation\n  help        Help about any command\n\nFlags:\n  -c, --config string     File path to compose file (default \"cfn-compose.yml\")\n  -d, --dry-run           Run commands in dry run mode\n  -h, --help              help for cfnc\n  -l, --loglevel string   Specify Log Levels. Valid Levels are: DEBUG, INFO, WARN, ERROR (default \"INFO\")\n  -v, --version           version for cfnc\n\nUse \"cfnc [command] --help\" for more information about a command.\n```\n\n#### Examples\n\n```shell\n## Deploy\ncfnc deploy\n## Deploy in dry run mode\ncfnc deploy -d\n\n## Destroy\ncfnc destroy\n## Destroy in dry run mode\ncfnc destroy -d\n\n## Generate Validate and Visualize compose configuration\ncfnc config generate\ncfnc config validate\ncfnc config visualize\n```\n\n## Man\n\n| Command               | Options          | Description                                                                     |\n| --------------------- | ---------------- | ------------------------------------------------------------------------------- |\n| cfnc                  | -h, --help, help | Get description of cfnc                                                         |\n| cfnc                  | -d, --dry-run    | enable dry run mode                                                             |\n| cfnc                  | -l, --loglevel   | Specify Log Levels. Valid Levels are: DEBUG, INFO, WARN, ERROR (default \"INFO\") |\n| cfnc                  | -c, --config     | File path to compose file (default \"cfn-compose.yml\")                           |\n| cfnc deploy           | with no flag     | deploys all the stacks                                                          |\n| cfnc deploy           | -f, --flow       | Cherry pick specific flow to deploy                                             |\n| cfnc destroy          | with no flag     | destroys all the stacks                                                         |\n| cfnc destroy          | -f, --flow       | Cherry pick specific flow to destroy                                            |\n| cfnc config generate  | no flags         | Generates compose template                                                      |\n| cfnc config validate  | no flags         | Validates the compose configuration                                             |\n| cfnc config visualize | no flags         | Visualize the stacks dependencies and creation order                            |\n| cfnc                  | -v, --version    | version for cfnc                                                                |\n\n## Documentation\n**Sample Config File:**\n\n```yaml\nDescription: Sample CloudFormation Compose file\nVars:\n  Key1: Value1\n  Key2: Value2\nFlows:\n  Flow1:\n    Order: 0\n    Description: Flow1 Description\n    Stacks:\n      - Stack1\n      - Stack2\n  Flow2:\n    Order: 1\n    Description: Flow2 description\n    Stacks:\n      - Stack1\n      - Stack2\n```\n\nA typical compose configuration contains:\n\n- Optional `Description`\n- Optional `Vars` section to define variables in `Key: Value` mapping. Only static variables are supported at the moment.\n  eg:\n\n```yaml\nVars:\n  ENV_TYPE: 'nonproduction'\n  ENV_NAME: 'demo'\n  AWS_PROFILE: 'demo'\n```\n\n- Mandatory `Flows:` section\n  `Flow` is a collection of CloudFormation stacks that are deployed sequentially. `Flows` is collection of flow which can be ordered using `Order` property. `Flows` can run in parallel or sequentially based on the Order property.\n  - Optional `Order` can be any `unsigned` integer. Default `Order` is set to `0`. Flow with lowest orders are deployed first.\n  - Optional `Description`\n  - Mandatory `Stacks` which is the collection of CFN stack. Below are the supported attributes of the stack object\n    - mandatory `template_file` or `template_url` (only s3 url)\n    - mandatory `stack_name`\n    - optional `capabilities`\n    - optional `parameters`\n    - optional `tags`\n    - optional `tags`\n\n**Sample:**\n\n```yaml\nDescription: Sample CloudFormation Compose file\nVars:\n  ENV_NAME: cfnc\n  ENV_TYPE: nonproduction\nFlows:\n  SecurityGroup:\n    Order: 0\n    Description: Creates SecurityGroup\n    Stacks:\n      - template_file: \u003ccfn-template-path\u003e\n        stack_name: stack-name1\n        parameters:\n          EnvironmentName: '{{ .ENV_NAME }}'\n          EnvironmentType: '{{ .ENV_TYPE }}'\n        tags:\n          EnvironmentName: '{{ .ENV_NAME }}'\n          EnvironmentType: '{{ .ENV_TYPE }}'\n\n  EC2Instance:\n    Order: 1\n    Description: Deploying EC2 Instance\n    Stacks:\n      - template_file: \u003ccfn-template-path\u003e\n        stack_name: stack-name2\n        parameters:\n          EnvironmentName: '{{ .ENV_NAME }}'\n          EnvironmentType: '{{ .ENV_TYPE }}'\n        tags:\n          EnvironmentName: '{{ .ENV_NAME }}'\n          EnvironmentType: '{{ .ENV_TYPE }}'\n```\n\nPlease consult examples for quick start [ec2-sg example](examples/ec2-sqs/Readme.md) and [demo ec2-sqs-rds example](examples/demo/Readme.md)\n\n## Contribution\n\u003ca href=\"https://github.com/rbalman/cfn-compose/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=rbalman/cfn-compose\" /\u003e\n\u003c/a\u003e\n\nThere exists ample opportunity for enhancement and you are welcome to make a valuable contribution. If you have any concerns, recommendations, ideas feel free to [create issues](https://github.com/rbalman/cfnc/issues) or [create PR](https://github.com/rbalman/cfnc/pulls).\n[Details Example](examples/ec2-sqs/Readme.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbalman%2Fcfn-compose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frbalman%2Fcfn-compose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbalman%2Fcfn-compose/lists"}