Skip to content

Commit

Permalink
docs: update home and repo readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Oguzhan Yilmaz committed Jun 27, 2023
1 parent 90be154 commit 27cba89
Show file tree
Hide file tree
Showing 4 changed files with 170 additions and 25 deletions.
95 changes: 77 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<!-- ### [**Go to QuickStart Page to get started using _balcony_**](quickstart.md) -->

### 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 <service> <resource-name>` 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 <service-name>` 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 <service-name> <resource-node>` 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)
94 changes: 88 additions & 6 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -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.
<!-- ### [**Go to QuickStart Page to get started using _balcony_**](quickstart.md) -->

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 <service> <resource-name>` 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)
4 changes: 4 additions & 0 deletions docs/terraform-import.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 27cba89

Please sign in to comment.