{"id":13602606,"url":"https://github.com/oguzhan-yilmaz/balcony","last_synced_at":"2025-05-16T16:08:41.842Z","repository":{"id":112735003,"uuid":"541575904","full_name":"oguzhan-yilmaz/balcony","owner":"oguzhan-yilmaz","description":"cli tool to read any resource off of AWS API. Also generates Terraform import-blocks, and actual Terraform Resource code.","archived":false,"fork":false,"pushed_at":"2025-02-15T21:44:41.000Z","size":16042,"stargazers_count":141,"open_issues_count":6,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-12T15:58:47.710Z","etag":null,"topics":["aws","aws-api","aws-cli","cli","code-generation","code-generator","docker","python3","terraform","terraform-import"],"latest_commit_sha":null,"homepage":"http://balcony.og-y.com/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oguzhan-yilmaz.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,"zenodo":null}},"created_at":"2022-09-26T12:30:40.000Z","updated_at":"2025-02-27T10:13:29.000Z","dependencies_parsed_at":"2024-04-10T21:30:50.227Z","dependency_job_id":"9c2d7637-ea59-429e-9b2c-9bd959619cf9","html_url":"https://github.com/oguzhan-yilmaz/balcony","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oguzhan-yilmaz%2Fbalcony","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oguzhan-yilmaz%2Fbalcony/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oguzhan-yilmaz%2Fbalcony/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oguzhan-yilmaz%2Fbalcony/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oguzhan-yilmaz","download_url":"https://codeload.github.com/oguzhan-yilmaz/balcony/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254564127,"owners_count":22092122,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","aws-api","aws-cli","cli","code-generation","code-generator","docker","python3","terraform","terraform-import"],"created_at":"2024-08-01T18:01:31.512Z","updated_at":"2025-05-16T16:08:41.823Z","avatar_url":"https://github.com/oguzhan-yilmaz.png","language":"Python","funding_links":[],"categories":["cli"],"sub_categories":[],"readme":"# balcony\n\n\u003cdiv style=\"display: flex;\"\u003e\n  \u003ca href=\"https://github.com/oguzhan-yilmaz/balcony/actions/workflows/docker-publish.yml\"\u003e\u003cimg src=\"https://github.com/oguzhan-yilmaz/balcony/actions/workflows/docker-publish.yml/badge.svg\" alt=\"Build and publish a Docker image to ghcr.io\"\u003e\u003c/a\u003e\n  \u003cspan style=\"width: 5px\"\u003e\u003c/span\u003e\n\n\u003ca href=\"https://github.com/oguzhan-yilmaz/balcony/actions/workflows/pages/pages-build-deployment\"\u003e\u003cimg src=\"https://github.com/oguzhan-yilmaz/balcony/actions/workflows/pages/pages-build-deployment/badge.svg\" alt=\"Build and Deploy Documentation website\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\nbalcony is a modern CLI tool that with some killer features:\n\n- Auto-fill the required parameters for AWS API calls\n- Read the JSON data of any AWS resource in your account\n- Generate [Terraform Import Blocks](https://developer.hashicorp.com/terraform/language/import)\n- Generate actual `.tf` Terraform Resource code\n\nbalcony uses _read-only_ operations, it does not take any action on the used AWS account.\n\n### [Visit the Documentation Website](https://oguzhan-yilmaz.github.io/balcony/quickstart/)\n\u003c!-- ### [**Go to QuickStart Page to get started using _balcony_**](quickstart.md) --\u003e\n\n### Installation\n\n```bash\npip3 install balcony\n```\n\nVisit [**Installation \u0026 QuickStart Page**](https://oguzhan-yilmaz.github.io/balcony/quickstart/) to get started using _balcony_\n\n```bash  title=\"Basic usage\"\n# see options\nbalcony\n\n# list available resources of ec2\nbalcony aws ec2 \n\n# read a resource\nbalcony aws s3 Buckets\n\n# show documentation\nbalcony aws iam Policy --list\n\n# generate terraform import blocks for a resource\nbalcony terraform-import s3 Buckets\n```\n\n## Features\n\n### Read any AWS Resource\n\n`balcony aws \u003cservice\u003e \u003cresource-name\u003e --paginate` command reads all resources of a given type in your AWS account.\n\nRelated Docs: [QuickStart](https://oguzhan-yilmaz.github.io/balcony/quickstart/)\n\n![](https://raw.githubusercontent.com/oguzhan-yilmaz/balcony-assets/main/gifs/aws-read-resource.gif)\n\n---\n\n### Filter and Exclude by Tags\n\n- [aws-jmespath-utils](https://github.com/oguzhan-yilmaz/aws-jmespath-utils) dependency is used to enable JMESPath expressions to filter and exclude resources by tags\n- Following expressions are used to select anything: (`=`, `*=`, `=*`, `*=*`)\n  - You can leave one side empty or put a `*` there to discard that sides value\n- \n\n### Filter tags\n\n- Select everything\n\n  ```bash\n  balcony aws ec2 Instances -js 'DescribeInstances[].Reservations[].Instances[].filter_tags(`[\"=\"]`, @).Tags'\n  balcony aws ec2 Instances -js 'DescribeInstances[].Reservations[].Instances[].filter_tags(`[\"*=\"]`, @).Tags'\n  balcony aws ec2 Instances -js 'DescribeInstances[].Reservations[].Instances[].filter_tags(`[\"=*\"]`, @).Tags'\n  balcony aws ec2 Instances -js 'DescribeInstances[].Reservations[].Instances[].filter_tags(`[\"*=*\"]`, @).Tags'\n  ```\n\n- Find named EC2 Instances\n\n  ```bash\n  balcony aws ec2 Instances -js 'DescribeInstances[].Reservations[].Instances[].filter_tags(`[\"Name=\"]`, @)'\n  ```\n\n- Find AWS MAP migration tagged EC2 Instances\n\n  ```bash\n  balcony aws ec2 Instances -js 'DescribeInstances[].Reservations[].Instances[].filter_tags(`[\"map-migrated=\"]`, @)'\n  ```\n\n### Exclude tags\n\n- Exclude everything\n\n  ```bash\n  balcony aws ec2 Instances -js 'DescribeInstances[].Reservations[].Instances[].exclude_tags(`[\"=\"]`, @).Tags'\n  balcony aws ec2 Instances -js 'DescribeInstances[].Reservations[].Instances[].exclude_tags(`[\"*=\"]`, @).Tags'\n  balcony aws ec2 Instances -js 'DescribeInstances[].Reservations[].Instances[].exclude_tags(`[\"=*\"]`, @).Tags'\n  balcony aws ec2 Instances -js 'DescribeInstances[].Reservations[].Instances[].exclude_tags(`[\"*=*\"]`, @).Tags'  \n  ```\n\n- Find un-named EC2 Instances\n\n  ```bash\n  balcony aws ec2 Instances -js 'DescribeInstances[].Reservations[].Instances[].exclude_tags(`[\"Name=\"]`, @)'\n  ```\n\n- Find AWS MAP migration un-tagged EC2 Instances\n\n  ```bash\n  balcony aws ec2 Instances -js 'DescribeInstances[].Reservations[].Instances[].exclude_tags(`[\"map-migrated=\"]`, @)'\n  ```\n\n---\n\n### Generate Terraform Import Blocks\n\nTerraform v1.5 introduced [import blocks](https://developer.hashicorp.com/terraform/language/import) that allows users to define their imports as code.\n\n`balcony terraform-import \u003cservice\u003e \u003cresource-name\u003e` command generates these import blocks for you.\n\n`balcony terraform-import --list` to see the list of supported resources.\n\nRelated Docs: [Generate Terraform Import Blocks](https://oguzhan-yilmaz.github.io/balcony/terraform-import/)\nRelated Docs: [Balcony Terraform Import Support Matrix](https://oguzhan-yilmaz.github.io/balcony/terraform-import-support-matrix/)\n\n![](https://raw.githubusercontent.com/oguzhan-yilmaz/balcony-assets/main/gifs/terraform-import-blocks-example.gif)\n\n---\n\n### Generate actual Terraform Resource Code\n\nIf you have:\n\n- initialized terraform project\n- `import_blocks.tf` file that's generated with `balcony terraform-import` command\n\nyou can run `terraform plan -generate-config-out=generated.tf` to generate actual `.tf` resource code.\n\nThis feature is achieved with the [balcony-terraform-import Docker Image](https://github.com/oguzhan-yilmaz/balcony/pkgs/container/balcony-terraform-import).\n\nRelated Docs: [Generate Terraform Code with Docker Image](https://oguzhan-yilmaz.github.io/balcony/terraform-import-docker/)\n\n![](https://raw.githubusercontent.com/oguzhan-yilmaz/balcony-assets/main/gifs/docker-gen-tf-code-ec2-insances-example.gif)\n\n---\n\n### Interactive Wizard to create balcony import configurations\n\nBalcony doesn't know how to create terraform `import blocks` for all of the AWS resources.\n\nIt 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.\n\nInteractive Wizards asks you required questions to automatically create the `import-configurations` yaml files.\n\nRelated Docs: [Terraform Import Configuration Wizard](https://oguzhan-yilmaz.github.io/balcony/terraform-import-wizard/)\n\n![](https://raw.githubusercontent.com/oguzhan-yilmaz/balcony-assets/main/gifs/terraform-wizard-security-groups-example.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foguzhan-yilmaz%2Fbalcony","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foguzhan-yilmaz%2Fbalcony","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foguzhan-yilmaz%2Fbalcony/lists"}