balcony is a modern, feature-rich command-line interface (CLI) tool designed to simplify your interactions with AWS. It provides unparalleled visibility into your cloud resources and dramatically accelerates your Infrastructure as Code (IaC) workflows by generating Terraform import blocks and even complete Terraform resource configurations.
Built with Python 🐍, typer ✨, and boto3 ⚙️, balcony offers a read-only perspective on your AWS environment, ensuring safe exploration and powerful automation capabilities without making any changes to your infrastructure.
- 🔍 AWS Resource Discovery: Effortlessly list and read the JSON data of any AWS resource in your account.
- 🎯 Smart Parameter Auto-fill:
balconyintelligently identifies and auto-fills required parameters for AWS API calls, saving you time and reducing errors. - 🏷️ Tag-based Filtering: Leverage JMESPath expressions to precisely filter and exclude AWS resources by their tags.
- 🏗️ Terraform Import Block Generation: Automatically generate
importblocks for existing AWS resources, adhering to Terraform v1.5+ standards. - 🔄 Terraform Resource Code Generation: Go beyond import blocks! Utilize
balcony's specialized Docker image to generate actual.tfTerraform resource configurations from your live AWS resources. - 🧙 Interactive Configuration Wizard: Create custom Terraform import configurations with an intuitive, interactive wizard, making
balconyadaptable to your specific IaC needs. - ⚡ Blazing Fast: Optimized for speed and efficiency, giving you quick insights and generations.
Get balcony up and running in minutes!
pip3 install balconyExplore your AWS resources and start generating Terraform configurations.
-
List Available Services & Resources:
# See all available AWS services balcony aws # List resources for a specific service, e.g., EC2 balcony aws ec2
-
Read an AWS Resource:
# Read all S3 buckets in your account balcony aws s3 Buckets --paginate -p # Read EC2 instances and filter by a JMESPath selector balcony aws ec2 Instances -js 'DescribeInstances[].Reservations[].Instances[].{InstanceId: InstanceId, State: State.Name, Tags: Tags}'
-
Generate Terraform Import Blocks:
# Generate import blocks for S3 Buckets balcony terraform-import s3 Buckets -o import_s3_buckets.tf # List all supported resources for Terraform import balcony terraform-import --list
-
Generate Terraform Resource Code with Docker: (Requires Docker installed)
First, generate import blocks (e.g.,
import_s3_buckets.tf). Then, use thebalcony-terraform-importDocker image:# Example: Assuming you have import_s3_buckets.tf in your current directory docker run --rm -v $(pwd):/terraform-app -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY -e AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION ghcr.io/oguzhan-yilmaz/balcony-terraform-import:latest plan -generate-config-out=generated.tf # This will create a 'generated.tf' file with the Terraform resource code.
For in-depth guides, advanced usage, and development insights, visit our comprehensive documentation website:
oguzhan-yilmaz.github.io/balcony/quickstart/
We welcome contributions! Whether it's reporting bugs, suggesting features, or submitting pull requests, your help makes balcony better. Please refer to our Contributing Guidelines (TODO: Create this file) for more details.
balcony is open-source software licensed under the Apache-2.0 License.
- GitHub Issues: For bug reports and feature requests, please use the GitHub Issue Tracker.
- Discussions: Join our GitHub Discussions (TODO: Enable Discussions) for questions, ideas, and general conversations.
- Twitter: Follow @oguzhan_y_ for updates.