diff --git a/README.md b/README.md index ec7a4e7..8ce20b9 100644 --- a/README.md +++ b/README.md @@ -10,39 +10,98 @@ -balcony dynamically parses AWS SDK(`boto3` library) and analyzes required parameters for each operation. +# balcony + +balcony is a modern CLI tool that with some killer features: + +- Auto-fill the required parameters for AWS API calls +- Read the JSON data of any AWS resource in your account +- Generate [Terraform Import Blocks](https://developer.hashicorp.com/terraform/language/import) +- Generate actual `.tf` Terraform Resource code + +balcony uses _read-only_ operations, it does not take any action on the used AWS account. + + + +### Installation + +```bash +pip3 install balcony +``` + +Visit [**Installation & QuickStart Page**](quickstart.md) to get started using _balcony_ + +```bash title="Basic usage" +# see options +balcony + +# list available resources of ec2 +balcony aws ec2 + +# read a resource +balcony aws s3 Buckets + +# generate terraform import blocks for a resource +balcony terraform-import s3 Buckets +``` + + +## Features + +### Read any AWS Resource +Related Docs: [QuickStart](https://oguzhan-yilmaz.github.io/balcony/quickstart/) + + +!!! tip "" + ![](visuals/reading-a-resource-node.gif) + +--- + +### Generate Terraform Import Blocks + +Terraform v1.5 introduced [import blocks](https://developer.hashicorp.com/terraform/language/import) that allows users to define their imports as code. + +`balcony terraform-import ` command generates these import blocks for you. + +`balcony terraform-import --list` to see the list of supported resources. + +Related Docs: [Generate Terraform Import Blocks](https://oguzhan-yilmaz.github.io/balcony/terraform-import/) + +!!! warning "" + ![](https://raw.githubusercontent.com/oguzhan-yilmaz/balcony-assets/main/gifs/terraform-import-blocks-example.gif) -By **establishing relations between operations over required parameters**, it's **able to auto-fill** them by reading the related operation beforehand. -By simply entering their name, balcony enables developers to easily list their AWS resources. +--- +### Generate actual Terraform Resource Code -## Installation & Documentation +If you have: -**[https://oguzhan-yilmaz.github.io/balcony/](https://oguzhan-yilmaz.github.io/balcony/quickstart)** +- initialized terraform project +- `import_blocks.tf` file that's generated with `balcony terraform-import` command -Balcony's documentation website contains quickstart guide, usage cookbook and more. +you can run `terraform plan -generate-config-out=generated.tf` to generate actual `.tf` resource code. +This feature is achieved with a Docker image. +Related Docs: [Generate Terraform Code with Docker Image](https://oguzhan-yilmaz.github.io/balcony/terraform-import-docker/) +!!! info "" + ![](https://raw.githubusercontent.com/oguzhan-yilmaz/balcony-assets/main/gifs/docker-gen-tf-code-ec2-insances-example.gif) -## Features & GIFs -> click to play the videos -### List Resource Nodes of an AWS Service -`balcony aws ` to see every Resource Node of a service. +--- -![](https://github.com/oguzhan-yilmaz/balcony/blob/main/docs/visuals/resource-node-list.gif) +### Interactive Wizard to create balcony import configurations +Balcony doesn't know how to create terraform `import blocks` for all of the AWS resources. -### Reading a Resource Node -`balcony aws ` to read operations of a Resource Node. +It can be taught how to do it by creating `import-configurations` yaml files, but it's a manual process. This is where the interactive wizard comes in. -![](https://github.com/oguzhan-yilmaz/balcony/blob/main/docs/visuals/reading-a-resource-node.gif) +Interactive Wizards asks you required questions to automatically create the `import-configurations` yaml files. +Related Docs: [Terraform Import Configuration Wizard](https://oguzhan-yilmaz.github.io/balcony/terraform-import-wizard/) -### Documentation and Input & Output of Operations -Use the `--list`, `-l` flag to print the given AWS API Operations documentation, input & output structure. - +!!! danger "" -![](https://github.com/oguzhan-yilmaz/balcony/blob/main/docs/visuals/list-option.gif) + ![](https://raw.githubusercontent.com/oguzhan-yilmaz/balcony-assets/main/gifs/terraform-wizard-security-groups-example.gif) diff --git a/docs/index.md b/docs/index.md index fb83857..75da6d2 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,13 +1,95 @@ # balcony -balcony is a Python based CLI tool that simplifies the process of enumerating AWS resources. +balcony is a modern CLI tool that with some killer features: -balcony dynamically parses `boto3` library and analyzes required parameters for each operation. +- Auto-fill the required parameters for AWS API calls +- Read the JSON data of any AWS resource in your account +- Generate [Terraform Import Blocks](https://developer.hashicorp.com/terraform/language/import) +- Generate actual `.tf` Terraform Resource code -By establishing relations between operations over required parameters, it's able to auto-fill them by reading the related operation beforehand. +balcony uses _read-only_ operations, it does not take any action on the used AWS account. -By simply entering their name, balcony enables developers to easily list their AWS resources. + -It uses _read-only_ operations, it does not take any action on the used AWS account. +### Installation -### [**Go to QuickStart Page to get started using _balcony_**](quickstart.md) +```bash +pip3 install balcony +``` + +Visit [**Installation & QuickStart Page**](quickstart.md) to get started using _balcony_ + +```bash title="Basic usage" +# see options +balcony + +# list available resources of ec2 +balcony aws ec2 + +# read a resource +balcony aws s3 Buckets + +# generate terraform import blocks for a resource +balcony terraform-import s3 Buckets +``` + + +## Features + +### Read any AWS Resource +Related Docs: [QuickStart](quickstart.md) + + +!!! tip "" + ![](visuals/reading-a-resource-node.gif) + +--- + +### Generate Terraform Import Blocks + +Terraform v1.5 introduced [import blocks](https://developer.hashicorp.com/terraform/language/import) that allows users to define their imports as code. + +`balcony terraform-import ` command generates these import blocks for you. + +`balcony terraform-import --list` to see the list of supported resources. + +Related Docs: [Generate Terraform Import Blocks](terraform-import.md) + +!!! warning "" + ![](https://raw.githubusercontent.com/oguzhan-yilmaz/balcony-assets/main/gifs/terraform-import-blocks-example.gif) + + +--- + +### Generate actual Terraform Resource Code + +If you have: + +- initialized terraform project +- `import_blocks.tf` file that's generated with `balcony terraform-import` command + +you can run `terraform plan -generate-config-out=generated.tf` to generate actual `.tf` resource code. + +This feature is achieved with a Docker image. + +Related Docs: [Generate Terraform Code with Docker Image](terraform-import-docker.md) + +!!! info "" + ![](https://raw.githubusercontent.com/oguzhan-yilmaz/balcony-assets/main/gifs/docker-gen-tf-code-ec2-insances-example.gif) + + +--- + +### Interactive Wizard to create balcony import configurations + +Balcony doesn't know how to create terraform `import blocks` for all of the AWS resources. + +It can be taught how to do it by creating `import-configurations` yaml files, but it's a manual process. This is where the interactive wizard comes in. + +Interactive Wizards asks you required questions to automatically create the `import-configurations` yaml files. + +Related Docs: [Terraform Import Configuration Wizard](terraform-import-wizard.md) + +!!! danger "" + + ![](https://raw.githubusercontent.com/oguzhan-yilmaz/balcony-assets/main/gifs/terraform-wizard-security-groups-example.gif) diff --git a/docs/terraform-import.md b/docs/terraform-import.md index 888bad4..4e89b9e 100644 --- a/docs/terraform-import.md +++ b/docs/terraform-import.md @@ -1,5 +1,9 @@ # Generate Terraform import blocks with balcony +## Example Recording: ec2 SecurityGroups + +![](https://raw.githubusercontent.com/oguzhan-yilmaz/balcony-assets/main/gifs/terraform-import-blocks-example.gif) + ## Introduction Terraform has released version 1.5, and it includes the [import blocks feature](https://developer.hashicorp.com/terraform/language/import) that allows users to define their imports as code. diff --git a/mkdocs.yml b/mkdocs.yml index 09ebf19..75be267 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -13,7 +13,7 @@ nav: - 'About Import Configurations': about-terraform-import.md - 'Generating Terraform Import Blocks': terraform-import.md - 'Actually Generate TF code with Docker': terraform-import-docker.md - - 'Terraform Import Wizard': terraform-import-wizard.md + - 'Terraform Import Configuration Wizard': terraform-import-wizard.md - 'Config Env Vars': environment-variables.md - 'How it Works?': - 'About boto3': how-it-works/about-boto3.md