Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cucxabong/tfit
Export resource from AWS into terraform format (HCL)
https://github.com/cucxabong/tfit
Last synced: 4 days ago
JSON representation
Export resource from AWS into terraform format (HCL)
- Host: GitHub
- URL: https://github.com/cucxabong/tfit
- Owner: cucxabong
- Created: 2018-11-19T07:31:13.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-11T08:00:15.000Z (almost 6 years ago)
- Last Synced: 2024-08-02T20:47:23.229Z (3 months ago)
- Language: Go
- Homepage:
- Size: 1.02 MB
- Stars: 33
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Export existing AWS resources to [Terraform](https://terraform.io/) style (HCL)
- [What's this](#whats-this)
- [Supported Resources](#supported-resources)
- [Installation](#installation)
- [Usage](#usage)
- [CLI](#cli)
- [Library](#library)## What's this
Inspired by [terraforming](https://terraforming.dtan4.net) & for learning purpose, I re-write that tool in Go (in form of library & CLI). Any feedbacks & suggestions are welcomed.## Supported Resources
* EC2
* Instances
* VPC
* Subnet
* Security Group
* Route & Route Table
* Auto Scaling
* Auto Scaling Group
* Launch Configuration
* Route53
* Hosted Zone
* Resource Record Set
* IAM
* Policy
* Role
* User
* Group
* S3
* Bucket
* ELB
* **Updating ......**## Installation
```bash
$ go get github.com/d0m0reg00dthing/tfit/cmd/tfit
```
## Usage
### CLI
```bash
$ $GOPATH/bin/tfit
Usage:
tfit [command]Available Commands:
as AutoScaling Related
ec2 EC2 Related
help Help about any command
iam IAM Related
route53 Route53 Hosted Zones & Resource Record Sets
s3 S3 Related resourcesFlags:
--access-key string AWS Access Key ID. Overrides AWS_ACCESS_KEY_ID environment variable
-h, --help help for tfit
--output string The output of HCL (Terraform config) contents (Default to StdOut)
--profile string AWS Profile. Overrides AWS_PROFILE environment variable
--region string AWS Region. Overrides AWS_REGION environment variable
--secret-key string AWS Secret Key. Overrides AWS_SECRET_ACCESS_KEY environment variableUse "tfit [command] --help" for more information about a command.
```#### Export S3 Buckets (Output to StdOut)
```bash
$ $GOPATH/bin/tfit--region us-east-1 --profile dev s3 buckets
``````hcl
resource "aws_s3_bucket" "bar" {
bucket = "bar"versioning {
mfa_delete = false
}
}resource "aws_s3_bucket" "foo" {
bucket = "foo"policy = <