All Projects → cycloidio → Terracognita

cycloidio / Terracognita

Licence: mit
Reads from existing Cloud Providers (reverse Terraform) and generates your infrastructure as code on Terraform configuration

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Terracognita

Terratag
Terratag is a CLI tool that enables users of Terraform to automatically create and maintain tags across their entire set of AWS, Azure, and GCP resources
Stars: ✭ 385 (-14.82%)
Mutual labels:  aws, cloud, azure, gcp, terraform, infrastructure-as-code, devops
Checkov
Prevent cloud misconfigurations during build-time for Terraform, Cloudformation, Kubernetes, Serverless framework and other infrastructure-as-code-languages with Checkov by Bridgecrew.
Stars: ✭ 3,572 (+690.27%)
Mutual labels:  aws, azure, gcp, terraform, infrastructure-as-code, devops
Infracost
Cloud cost estimates for Terraform in pull requests💰📉 Love your cloud bill!
Stars: ✭ 4,505 (+896.68%)
Mutual labels:  aws, cloud, gcp, terraform, infrastructure-as-code, azure
Tfsec
Security scanner for your Terraform code
Stars: ✭ 3,622 (+701.33%)
Mutual labels:  aws, azure, google-cloud-platform, terraform, infrastructure-as-code
Pulumi
Pulumi - Developer-First Infrastructure as Code. Your Cloud, Your Language, Your Way 🚀
Stars: ✭ 10,887 (+2308.63%)
Mutual labels:  aws, cloud, azure, gcp, infrastructure-as-code
My Links
Knowledge seeks no man
Stars: ✭ 311 (-31.19%)
Mutual labels:  aws, cloud, gcp, infrastructure-as-code, devops
Docker Android
Android in docker solution with noVNC supported and video recording
Stars: ✭ 4,042 (+794.25%)
Mutual labels:  aws, cloud, azure, gcp, terraform
Terraformer
CLI tool to generate terraform files from existing infrastructure (reverse Terraform). Infrastructure to Code
Stars: ✭ 6,316 (+1297.35%)
Mutual labels:  aws, cloud, gcp, terraform, infrastructure-as-code
Engine
Deploy your apps on any Cloud provider in just a few seconds
Stars: ✭ 1,132 (+150.44%)
Mutual labels:  aws, cloud, azure, gcp, terraform
Docker Swarm
🐳🐳🐳 This repository is part of a blog series on Docker Swarm example using VirtualBox, OVH Openstack, Azure and Amazon Web Services AWS
Stars: ✭ 43 (-90.49%)
Mutual labels:  aws, cloud, azure, infrastructure-as-code, devops
Terraboard
🌍 📋 A web dashboard to inspect Terraform States
Stars: ✭ 1,192 (+163.72%)
Mutual labels:  aws, terraform, infrastructure-as-code, devops, devops-tools
Howtheyaws
A curated collection of publicly available resources on how technology and tech-savvy organizations around the world use Amazon Web Services (AWS)
Stars: ✭ 389 (-13.94%)
Mutual labels:  aws, cloud, infrastructure-as-code, devops
Learn Devops
🚧 Learn the craft of "DevOps" (Developer Operations) to Deploy your App and Monitor it so it stays "Up"!
Stars: ✭ 139 (-69.25%)
Mutual labels:  aws, azure, devops, devops-tools
Hybrid multicloud overlay
MutiCloud_Overlay demonstrates a use case of overlay over one or more clouds such as AWS, Azure, GCP, OCI, Alibaba and a vSphere private infrastructure in Hub and spoke topology, point to point topology and in a Single cloud. Overlay protocols IPv6 and IPv4 are independent of underlying infrastructure. This solution can be integrated with encryption and additional security features.
Stars: ✭ 127 (-71.9%)
Mutual labels:  aws, azure, gcp, terraform
Terraform Kubestack
Terraform GitOps Framework — Everything you need to build reliable automation for AKS, EKS and GKE Kubernetes clusters in one free and open-source framework.
Stars: ✭ 300 (-33.63%)
Mutual labels:  aws, azure, gcp, terraform
Terraform
Terraform automation for Cloud
Stars: ✭ 121 (-73.23%)
Mutual labels:  aws, terraform, infrastructure-as-code, devops
Externalsecret Operator
An operator to fetch secrets from cloud services and inject them in Kubernetes
Stars: ✭ 177 (-60.84%)
Mutual labels:  aws, cloud, azure, gcp
Adapt
ReactJS for your infrastructure. Create and deploy full-stack apps to any infrastructure using the power of React.
Stars: ✭ 317 (-29.87%)
Mutual labels:  aws, cloud, infrastructure-as-code, devops
Cloudblock
Cloudblock automates deployment of secure ad-blocking for all of your devices - even when mobile. Step-by-step text and video guides included! Compatible clouds include AWS, Azure, Google Cloud, and Oracle Cloud. Cloudblock deploys Wireguard VPN, Pi-Hole DNS Ad-blocking, and DNS over HTTPS in a cloud provider - or locally - using Terraform and Ansible.
Stars: ✭ 257 (-43.14%)
Mutual labels:  aws, cloud, gcp, terraform
Arvados
An open source platform for managing and analyzing biomedical big data
Stars: ✭ 274 (-39.38%)
Mutual labels:  aws, cloud, azure, gcp

TerraCognita

GoDoc Gitter chat AUR package Homebrew

Imports your current Cloud infrastructure to an Infrastructure As Code Terraform configuration (HCL) or/and to a Terraform State.

At Cycloid, Infrastructure As Code is in the company DNA since the beginning. To help our new customers adopting this best practice, we decided to build Terracognita to convert an existing infrastructure on Cloud Infrastructure into Terraform code in an automated way, relying on Terraform providers built by the community. We focused on AWS, GCP and Azure but Alibaba, Vmware and Openstack will be the next to be integrated.

We decided to Open Source this tool as we believe that it will help people to adopt IaC in an easy way. Cycloid provides this tool to let people import their infrastructure into Cycloid's pipelines, allow them to generate infrastructure diagram and manage all infra/application life cycle from a single interface.

If you are interested in contributing to Terracognita or simply curious about what's next, take a look at the public roadmap. For a high level overview, check out the What is Terracognita? blogpost.

Cloud providers

Terracognita currently imports AWS, GCP and AzureRM cloud provider as Terraform (0.13.5) resource/state. Please see the following versions as follow:

Providers:

  • AWS: 3.1.0
  • AzureRM: 2.34.0
  • GCP: 3.40.0

Installation

Binary

Visit the releases page to select your system, architecture and version you need. To pull the latest release:

$ curl -L https://github.com/cycloidio/terracognita/releases/latest/download/terracognita-linux-amd64.tar.gz -o terracognita-linux-amd64.tar.gz
$ tar -xf terracognita-linux-amd64.tar.gz
$ chmod u+x terracognita-linux-amd64
$ sudo mv terracognita-linux-amd64 /usr/local/bin/terracognita

Development

You can build and install with the latest sources, you will enjoy the new features and bug fixes. It uses Go Modules, so GO 1.15+ is required.

$ git clone https://github.com/cycloidio/terracognita
$ cd terracognita
$ make install

Arch Linux

There are two entries in the AUR: terracognita-git (targets the latest git commit) and terracognita (targets the latest stable release).

$ yay -Ss terracognita
aur/terracognita 1:0.3.0-1 (+0 0.00%)
    Reads from existing Cloud Providers (reverse Terraform) and generates your infrastructure as code on Terraform configuration
aur/terracognita-git 1:v0.3.0.r27.gdfc5a99-1 (+0 0.00%)
    Reads from existing Cloud Providers (reverse Terraform) and generates your infrastructure as code on Terraform configuration

Install via brew

If you're macOS user and using Homebrew, you can install via brew command:

$ brew install terracognita

Usage

Using the terracognita --help you will know the basics.

$ make help
help: Makefile                   This help dialog
lint: $(GOLANGCI_LINT) $(GOLINT) Runs the linter
test:                            Runs the tests
ci: lint test                    Runs the linter and the tests
dbuild:                          Builds the docker image with same name as the binary
build:                           Bulids the binary
clean:                           Removes binary and/or docker image

asciicast

Modules

Terracognita can generate Terraform Modules directly when importing. To enable this feature you'll need to use the --module {module/path/name} and then on that specific path is where the module will be generated. The path has to be directory or a none existent path (it'll be created), the content of the path will be deleted (after user confirmation) so we can have a clean import.

The output structure will look like (having --module test) this where each file aggregates the resources from the same "category":

test/
├── module-test
│   ├── autoscaling.tf
│   ├── cloud_front.tf
│   ├── cloud_watch.tf
│   ├── ec2.tf
│   ├── elastic_load_balancing_v2_alb_nlb.tf
│   ├── iam.tf
│   ├── rds.tf
│   ├── route53_resolver.tf
│   ├── route53.tf
│   ├── s3.tf
│   ├── ses.tf
│   └── variables.tf
└── module.tf

By default all the attributes will be changed for variables, those variables will then be on the module-{name}/variables.tf and exposed on the module.tf like so:

module "test" {
  # aws_instance_front_instance_type = "t2.small"
  [...]
  source = "module-test"
}

If you want to change this behavior, as for big infrastructures this will create a lot of variables, you can use the --module-varibles path/to/file and the file will have the list of attributes that you want to actually be used as variables, it can be in JSON or YAML:

{
  "aws_instance": [
    "instance_type",
    "cpu_threads_per_core",
    "cpu_core_count"
  ]
}
aws_instance:
  - instance_type
  - cpu_threads_per_core
  - cpu_core_count

Docker

You can use directly the image built, or you can build your own. To build your Docker image just run:

$ make dbuild

And then depending on the image you want to use (cycloid/terracognita or your local build terracognita):

$ docker run cycloid/terracognita -h

Example:

$ export AWS_ACCESS_KEY_ID=XXXXXXXXXXXXXXXXXXXX
$ export AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
$ export AWS_DEFAULT_REGION=xx-yyyy-0
$ docker run \
		-v "${PWD}"/outputs:/app/outputs \
		cycloid/terracognita aws \
		--hcl app/outputs/resources.tf

Local

The local version can be used the same way as docker. You simply need to be build it locally.

To test

To speed up the testing, you can write a small provider.tffile within the same folder you imported your resources & tfstate:

terraform {
 backend "local" {
   path = "./$TFSTATE_PATH"
 }
}

provider "aws" {
 access_key = "${var.access_key}"
 secret_key = "${var.secret_key}"
 region     = "${var.region}"
 version    = "2.12.0"
}

variable "access_key" {}
variable "secret_key" {}
variable "region" {}

Then run the terraform init & plan commands:

$ terraform init
$ terraform plan -var access_key=$AWS_ACCESS_KEY_ID -var secret_key=$AWS_SECRET_ACCESS_KEY -var region=$AWS_DEFAULT_REGION

License

Please see the MIT LICENSE file.

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

About Cycloid

Cycloid is a European fully-remote company, building a product to simplify, accelerate and optimize your DevOps and Cloud adoption.

We built Cycloid, your DevOps framework to encourage Developers and Ops to work together with the respect of best practices. We want to provide a tool that eliminates the silo effect in a company and allows to share the same level of informations within all professions.

Cycloid supports you to factorize your application in a reproducible way, to deploy a new environment in one click. This is what we call a stack.

A stack is composed of 3 pillars:

  1. the pipeline (Concourse)
  2. infrastructure layer (Terraform)
  3. applicative layer (Ansible)

Thanks to the flexible pipeline, all the steps and technologies are configurable.

To make it easier to create a stack, we build an Infrastructure designer named StackCraft that allows you to drag & drop Terraform resources and generate your Terraform files for you.

Terracognita is a brick that will help us to import an existing infrastructure into a stack to easily adopt Cycloid product.

The product comes also with an Open Source service catalog (all our public stacks are on Github) to deploy applications seamlessly. To manage the whole life cycle of an application, it also integrates the diagram of the infrastructure and the application, a cost management control to centralize Cloud billing, the monitoring, logs and events centralized with Prometheus, Grafana, ELK.

Don't hesitate to contact us, we'll be happy to meet you !

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].