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

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

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 !

Owner
Cycloid
a DevOps framework with CI/CD pipeline
Cycloid
Comments
  • Cannot connect to Google Cloud

    Cannot connect to Google Cloud

    Today I wanted to use Terracognita with Google Cloud but I was unable to connect to the Google cloud and got this error message:

    mkoeller01@SKYSCRAPER1:/mnt/c/Users/Manfred/Downloads/linux/created_environments/google_webserver_terracognita$ terracognita google --hcl app/outputs/resources.tf --region us-central1 --project starlit-cocoa-318709 --credentials /mnt/c/Users/Manfred/Downloads/starlit-cocoa-318709-6c9fd9234997.json Error: could not initialize 'terraform/google.Config.LoadAndValidate()' because: unable to parse credentials from '/mnt/c/Users/Manfred/Downloads/starlit-cocoa-318709-6c9fd9234997.json': invalid character '/' looking for beginning of value could not initialize 'terraform/google.Config.LoadAndValidate()' because: unable to parse credentials from '/mnt/c/Users/Manfred/Downloads/starlit-cocoa-318709-6c9fd9234997.json': invalid character '/' looking for beginning of value

  • Support AWS profiles/config

    Support AWS profiles/config

    Don't insist on an AWS key/secret-key, ideally use profiles as the standard AWS SDK supports them.

    Accepting a session-token parameter might be a vaguely acceptable mid-way step for your code...

  • panic during parsing

    panic during parsing

    Using docker to pull the latest version of terracognita I attempted to import a medium sized AWS account. Ran into the ListBuckets issue mentioned in issue #29. Reran with --exclude=aws_s3_bucket, which seemed to run almost to completion. After showing SES related DEBUG output, I got the following panic():

    Error: could not import from AWS: error while fmt HCL: In <standard input>: At 9438:5: expected: IDENT | STRING | ASSIGN | LBRACE got: NUMBER
    error while Sync Config
    github.com/cycloidio/terracognita/provider.Import
            /app/provider/import.go:73
    github.com/cycloidio/terracognita/cmd.glob..func1
            /app/cmd/aws.go:66
    github.com/spf13/cobra.(*Command).execute
            /go/pkg/mod/github.com/spf13/[email protected]/command.go:762
    github.com/spf13/cobra.(*Command).ExecuteC
            /go/pkg/mod/github.com/spf13/[email protected]/command.go:852
    github.com/spf13/cobra.(*Command).Execute
            /go/pkg/mod/github.com/spf13/[email protected]/command.go:800
    main.main
            /app/main.go:11
    runtime.main
            /usr/local/go/src/runtime/proc.go:200
    runtime.goexit
            /usr/local/go/src/runtime/asm_amd64.s:1337
    
  • MacOS version not updated in 0.4.0 release

    MacOS version not updated in 0.4.0 release

    General information:

    • Operating System: MacOS Catalina 10.15.4
    • Terracognita version / tag: The current version is: v0.3.0-65-g72cf96b
    • Did you build Terracognita from sources or did you use the Docker image: Downloaded from here.

    Describe the bug:

    Running:

    $ curl -L https://github.com/cycloidio/terracognita/releases/download/v0.4.0/terracognita-darwin-amd64.tar.gz -o terracognita-darwin-amd64.tar.gz && tar -xf terracognita-darwin-amd64.tar.gz && chmod +x terracognita-darwin-amd64 && ./terracognita-darwin-amd64 version
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100   645  100   645    0     0   1514      0 --:--:-- --:--:-- --:--:--  1514
    100  101M  100  101M    0     0   9.9M      0  0:00:10  0:00:10 --:--:-- 11.1M
    The current version is: v0.3.0-65-g72cf96b
    
  • AWS provider giving some gibberish in tags.

    AWS provider giving some gibberish in tags.

    General information:

    • Operating System: ArchLinux
    • Terracognita version / tag: git build
    • Did you build Terracognita from sources or did you use the Docker image: Built from sources.

    Describe the bug:

    Getting gibberish and many errors. Doesn't happen with others like terraformer

    Log message

    Missing attribute separator: Expected a newline or comma to mark the beginning of the next attribute. HCL

    Additional context

    image

  • terracognita for redis setup

    terracognita for redis setup

    If I am trying to convert my redis-setup shell script files to redis -setup hcl files by using terracognita I am not getting changed, could you please let me know how to change it.(I had already used flag include also) Screenshot from 2021-07-22 18-04-15

  • Failing to run in eu-west-1

    Failing to run in eu-west-1

    General information:

    • Operating System: MacOS Big Sur
    • Terracognita version / tag: v0.6.2
    • Did you build Terracognita from sources or did you use the Docker image: installed from Brew

    Describe the bug:

    When running against our AWS account with resources in eu-west-1, we get a 403 when terracognita tries to call endpoints in API Gateway. Not only are there no resources in API Gateway in this account, but this is being run with AWSAdministratorAccess, so no permissions issues should occur.

    I think this could be related to #171, where assumptions about certain resources existing in all regions is not true.

    Log message

    ts=2021-04-01T10:54:41.332899Z caller=provider.go:39 func=reader.New msg="configuring aws Reader"
    ts=2021-04-01T10:54:42.021977Z caller=provider.go:52 func=aws.NewProvider msg="configuring TF Client"
    ts=2021-04-01T10:54:42.995209Z caller=aws.go:99 func=cmd.aws.RunE msg="initializing HCL writer"
    ts=2021-04-01T10:54:42.995278Z caller=aws.go:108 func=cmd.aws.RunE msg=importing
    ts=2021-04-01T10:54:42.99529Z caller=aws.go:111 func=cmd.aws.RunE msg="starting terracognita" version=v0.6.2
    ts=2021-04-01T10:54:42.995316Z caller=import.go:66 func=provider.Import filters="\n\tTags:    [],\n\tInclude: [],\n\tExclude: [],\n\tTargets: [],\n"
    ts=2021-04-01T10:54:42.996259Z caller=import.go:82 func=provider.Import resource=aws_instance msg="fetching the list of resources"
    ts=2021-04-01T10:54:43.073336Z caller=import.go:168 func=provider.Import resource=aws_instance msg="importing done"
    ts=2021-04-01T10:54:43.073514Z caller=import.go:82 func=provider.Import resource=aws_alb msg="fetching the list of resources"
    ts=2021-04-01T10:54:43.22091Z caller=import.go:168 func=provider.Import resource=aws_alb msg="importing done"
    ts=2021-04-01T10:54:43.221132Z caller=import.go:82 func=provider.Import resource=aws_alb_listener msg="fetching the list of resources"
    ts=2021-04-01T10:54:43.221206Z caller=import.go:168 func=provider.Import resource=aws_alb_listener msg="importing done"
    ts=2021-04-01T10:54:43.221245Z caller=import.go:82 func=provider.Import resource=aws_alb_listener_certificate msg="fetching the list of resources"
    ts=2021-04-01T10:54:43.221288Z caller=import.go:168 func=provider.Import resource=aws_alb_listener_certificate msg="importing done"
    ts=2021-04-01T10:54:43.221323Z caller=import.go:82 func=provider.Import resource=aws_alb_listener_rule msg="fetching the list of resources"
    ts=2021-04-01T10:54:43.221357Z caller=import.go:168 func=provider.Import resource=aws_alb_listener_rule msg="importing done"
    ts=2021-04-01T10:54:43.22139Z caller=import.go:82 func=provider.Import resource=aws_alb_target_group msg="fetching the list of resources"
    ts=2021-04-01T10:54:43.258598Z caller=import.go:168 func=provider.Import resource=aws_alb_target_group msg="importing done"
    ts=2021-04-01T10:54:43.258847Z caller=import.go:82 func=provider.Import resource=aws_alb_target_group_attachment msg="fetching the list of resources"
    ts=2021-04-01T10:54:43.296053Z caller=import.go:168 func=provider.Import resource=aws_alb_target_group_attachment msg="importing done"
    ts=2021-04-01T10:54:43.296187Z caller=import.go:82 func=provider.Import resource=aws_api_gateway_deployment msg="fetching the list of resources"
    Error: could not import from AWS: AccessDeniedException:
            status code: 403, request id: 55c361c4-2b0e-4cd9-996f-26ed909f7a49
    error while reading from resource "aws_api_gateway_deployment"
    github.com/cycloidio/terracognita/aws.(*aws).Resources
            github.com/cycloidio/terracognita/aws/provider.go:93
    github.com/cycloidio/terracognita/provider.Import
            github.com/cycloidio/terracognita/provider/import.go:91
    github.com/cycloidio/terracognita/cmd.glob..func2
            github.com/cycloidio/terracognita/cmd/aws.go:112
    github.com/spf13/cobra.(*Command).execute
            github.com/spf13/[email protected]/command.go:842
    github.com/spf13/cobra.(*Command).ExecuteC
            github.com/spf13/[email protected]/command.go:950
    github.com/spf13/cobra.(*Command).Execute
            github.com/spf13/[email protected]/command.go:887
    main.main
            github.com/cycloidio/terracognita/main.go:11
    runtime.main
            runtime/proc.go:225
    runtime.goexit
            runtime/asm_amd64.s:1371
    github.com/cycloidio/terracognita/provider.Import
            github.com/cycloidio/terracognita/provider/import.go:98
    github.com/cycloidio/terracognita/cmd.glob..func2
            github.com/cycloidio/terracognita/cmd/aws.go:112
    github.com/spf13/cobra.(*Command).execute
            github.com/spf13/[email protected]/command.go:842
    github.com/spf13/cobra.(*Command).ExecuteC
            github.com/spf13/[email protected]/command.go:950
    github.com/spf13/cobra.(*Command).Execute
            github.com/spf13/[email protected]/command.go:887
    main.main
            github.com/cycloidio/terracognita/main.go:11
    runtime.main
            runtime/proc.go:225
    runtime.goexit
            runtime/asm_amd64.s:1371
    
  • azurerm: fix resource naming and caching issues

    azurerm: fix resource naming and caching issues

    fix resource name in azurerm_dns_aaaa_record, azurerm_private_dns_aaaa_record and azurerm_mssql_elastic_pool and also fix caching of resources Closes #303 and #305

  • aws doesn't initialize for govcloud credentials

    aws doesn't initialize for govcloud credentials

    General information:

    • Operating System: Ubuntu 20.04
    • Terracognita version / tag: v0.7.4
    • Did you build Terracognita from sources or did you use the Docker image: source

    Describe the bug: Using Govcloud credentials fails with the following error

    could not initialize 'reader' because: InvalidClientTokenId: The security token included in the request is invalid.
    	status code: 403, request id: 77795d87-8696-4ad7-898c-d0ecdafc4a6b
    

    I have used all combinations of command flags and environment variables to test if something would work, but it does not. To make sure my credentials were valid, I ran serveral aws ... commands, and they ran succesfully.

    As a control, I am able to connect to another account in us-east-1 and terracognita works for me there.

    Log message

    could not initialize 'reader' because: InvalidClientTokenId: The security token included in the request is invalid.
    	status code: 403, request id: 77795d87-8696-4ad7-898c-d0ecdafc4a6b
    

    Additional context

    I tried looking through the code for anything that would break for Govcloud or regions like us-gov-west-1 but I couldn't find anything. I suspect it's something special about the region that breaks the initializer.

  • AzureRM provider implementation

    AzureRM provider implementation

    Not all resources can be filtered by Resource Group or Location, should we returns all by default or make it required to have a resource group and/or a location ?

    I still don't know how to use tags to filter resources with the Azure Go SDK.

  • Unable to build binary on Mac OS X - impossible type assertion

    Unable to build binary on Mac OS X - impossible type assertion

    I followed the instructions to build my own binary but instead I got an error

      ~/go/src/github.com/cycloidio/terracognita                                                                                                                                                                               
    ╰─ make install                                                   
    GO111MODULE=on CGO_ENABLED=0 GOARCH=amd64 go install -ldflags "-X github.com/cycloidio/terracognita/cmd.Version=v0.1.5-16-gae4c64f"
    # github.com/cycloidio/terracognita/aws
    aws/provider.go:46:32: impossible type assertion:
            *"github.com/hashicorp/terraform/helper/schema".Provider does not implement "github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/terraform".ResourceProvider (wrong type for Apply method)
                    have Apply(*"github.com/hashicorp/terraform/terraform".InstanceInfo, *"github.com/hashicorp/terraform/terraform".InstanceState, *"github.com/hashicorp/terraform/terraform".InstanceDiff) (*"github.com/hashicorp/terraform/terraform".InstanceState, error)
                    want Apply(*"github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/terraform".InstanceInfo, *"github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/terraform".InstanceState, *"github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/terraform".InstanceDiff) (*"github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/terraform".InstanceState, error)
    make: *** [install] Error 2
    
    

    I am pretty new to Golang, so I am not sure what could be the possible error.

    I also downloaded the terraform libraries via

    go get -d github.com/terraform-providers/terraform-provider-aws
    go get -d github.com/hashicorp/terraform
    

    This is on macOS High Sierra (10.13.6) on go version go1.10.3 darwin/amd64

  • SIGSEGV When importing

    SIGSEGV When importing

    General information:

    • Operating System: Linux 04211eda4807 5.10.102.1-microsoft-standard-WSL2 #1 SMP Wed Mar 2 00:30:59 UTC 2022 x86_64 GNU/Linux
    • Terracognita version / tag: v0.8.1
    • Did you build Terracognita from sources or did you use the Docker image: Downloaded Binary

    Describe the bug:

    Using the command terracognita aws --aws-profile profile --aws-default-region us-east-1 with either --hcl file.hcl or --module module throws the error below. Reproducible using --include aws_eip

    Log message

    ts=2022-10-26T19:14:56.663436785Z caller=provider.go:44 func=reader.New msg="configuring aws Reader"
    ts=2022-10-26T19:14:56.944233771Z caller=provider.go:57 func=aws.NewProvider msg="configuring TF Client"
    ts=2022-10-26T19:14:57.240913647Z caller=root.go:310 func=cmd.aws.RunE msg="initializing HCL writer"
    ts=2022-10-26T19:14:57.240995884Z caller=root.go:315 func=cmd.aws.RunE msg="initializing TFState writer"
    ts=2022-10-26T19:14:57.2410168Z caller=root.go:319 func=cmd.aws.RunE msg=importing
    ts=2022-10-26T19:14:57.241030269Z caller=root.go:322 func=cmd.aws.RunE msg="starting terracognita" version=v0.8.1
    ts=2022-10-26T19:14:57.241046594Z caller=import.go:66 func=provider.Import filters="\n\tTags:    [],\n\tInclude: [aws_eip],\n\tExclude: [],\n\tTargets: [],\n"
    ts=2022-10-26T19:14:57.241075545Z caller=import.go:82 func=provider.Import resource=aws_eip msg="fetching the list of resources"
    panic: runtime error: invalid memory address or nil pointer dereference
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x66cd31c]
    
    goroutine 1 [running]:
    github.com/cycloidio/terracognita/aws.eips({0x1285fb98, 0xc00013a000}, 0xc0008ea740, {0xc00081e1e8, 0x7}, 0xc0005aed00)
            /tmp/build/6b18b934/code/aws/resources.go:1517 +0x15c
    github.com/cycloidio/terracognita/aws.(*aws).Resources(0xc001d478c0, {0x1285fb98, 0xc00013a000}, {0xc00081e1e8, 0x7}, 0x1)
            /tmp/build/6b18b934/code/aws/provider.go:96 +0xba
    github.com/cycloidio/terracognita/provider.Import({0x1285fb98, 0xc00013a000}, {0x12a8ffc8, 0xc0008ea740}, {0x128611e8, 0xc00047e1e0}, {0x12861220, 0xc001d47770}, 0xc0015fbdc0, {0x126dfd80, ...})
            /tmp/build/6b18b934/code/provider/import.go:91 +0xae3
    github.com/cycloidio/terracognita/cmd.importProvider({0x1285fb98, 0xc00013a000}, {0x126d1b60, 0xc0004955f0}, {0x12a8ffc8, 0xc0008ea740})
            /tmp/build/6b18b934/code/cmd/root.go:323 +0x530
    github.com/cycloidio/terracognita/cmd.glob..func2(0x1d68d580, {0xc0004a5d90, 0xb, 0xb})
            /tmp/build/6b18b934/code/cmd/aws.go:78 +0x2d9
    github.com/spf13/cobra.(*Command).execute(0x1d68d580, {0xc0004a5ce0, 0xb, 0xb})
            /tmp/build/6b18b934/go/pkg/mod/github.com/spf13/[email protected]/command.go:852 +0x60e
    github.com/spf13/cobra.(*Command).ExecuteC(0x1d68d300)
            /tmp/build/6b18b934/go/pkg/mod/github.com/spf13/[email protected]/command.go:960 +0x3ad
    github.com/spf13/cobra.(*Command).Execute(...)
            /tmp/build/6b18b934/go/pkg/mod/github.com/spf13/[email protected]/command.go:897
    main.main()
            /tmp/build/6b18b934/code/main.go:11 +0x25
    

    Additional context

    Glancing through the list of elastic IP resources I don't see any glaring oddness that would cause this from the AWS end

  • hcl: The Provider configuration will be added to the block even if not required

    hcl: The Provider configuration will be added to the block even if not required

    If the provider has a configuration defiend but it's not required it'll setill be added to ease the configuraiton.

    As some providers removed the 'required' from the attributes, this was getting less writtng when it actually should because it eases a lot the module configuration

  • aws: import issue at aws_media_store_container with 503 error

    aws: import issue at aws_media_store_container with 503 error

    Issue mentioned at issue 304

    Error: could not import from AWS: SerializationError: failed to unmarshal response error
            status code: 503, request id:
    caused by: UnmarshalError: error message missing
    error while reading from resource "aws_media_store_container"
    github.com/cycloidio/terracognita/aws.(*aws).Resources
            /tmp/build/6b18b934/code/aws/provider.go:105
    github.com/cycloidio/terracognita/provider.Import
            /tmp/build/6b18b934/code/provider/import.go:91
    github.com/cycloidio/terracognita/cmd.glob..func2
            /tmp/build/6b18b934/code/cmd/aws.go:110
    github.com/spf13/cobra.(*Command).execute
            ***@***.******@***.***/command.go:852>
    github.com/spf13/cobra.(*Command).ExecuteC
            ***@***.******@***.***/command.go:960>
    github.com/spf13/cobra.(*Command).Execute
            ***@***.******@***.***/command.go:897>
    main.main
            /tmp/build/6b18b934/code/main.go:11
    runtime.main
            /usr/local/go/src/runtime/proc.go:255
    runtime.goexit
            /usr/local/go/src/runtime/asm_amd64.s:1581
    github.com/cycloidio/terracognita/provider.Import
            /tmp/build/6b18b934/code/provider/import.go:98
    github.com/cycloidio/terracognita/cmd.glob..func2
            /tmp/build/6b18b934/code/cmd/aws.go:110
    github.com/spf13/cobra.(*Command).execute
            ***@***.******@***.***/command.go:852>
    github.com/spf13/cobra.(*Command).ExecuteC
            ***@***.******@***.***/command.go:960>
    github.com/spf13/cobra.(*Command).Execute
            ***@***.******@***.***/command.go:897>
    main.main
            /tmp/build/6b18b934/code/main.go:11
    runtime.main
            /usr/local/go/src/runtime/proc.go:255
    runtime.goexit
            /usr/local/go/src/runtime/asm_amd64.s:1581
    
  • azurerm: Only allow import of policy_definitions and policy_set_definitions of type custom

    azurerm: Only allow import of policy_definitions and policy_set_definitions of type custom

    As of now terracognita imports all resources of type azurerm_policy_definitions and policy_set_definition, including the default ones (around 1k). This results in a longdelay to import terracognita resources for azurerm. Since most likely these resources don't need to be changed and the user won't want to import them, i think that only custom type resources should be imported by default.

    This can be easily done by adding the following code to the corresponding functions at azurerm/resources.go

    func policyDefinitions(ctx context.Context, a *azurerm, ar *AzureReader, resourceType 
    ....
    for _, policyDefinition := range policyDefinitions {
    // only adds policy definition type custom otherwise otherwise import all default ones
      if policyDefinition.DefinitionProperties.PolicyType == policy.TypeCustom {
        r := provider.NewResource(*policyDefinition.ID, resourceType, a)
        resources = append(resources, r)
      }
    }
    
  • aws aws_alb_listener_rule condition

    aws aws_alb_listener_rule condition

    General information:

    • Operating System: macOS
    • Terracognita version / tag: v0.7.6-12
    • Did you build Terracognita from sources or did you use the Docker image: homebrew

    Describe the bug: I did

    terracognita aws --aws-default-region eu-central-1 --aws-access-key […] --aws-secret-access-key […] --module tst --include aws_alb_listener_rule
    cd tst
    terraform init
    terraform plan
    

    This is what happend:

    │ Error: Insufficient condition blocks
    │
    │   on module-tst/elastic_load_balancing_v2_alb_nlb.tf line 122, in resource "aws_alb_listener_rule" "arn_aws_elasticloadbalancing_eu_central_1_999999999999_listener_rule_xyz_xyz_xyz_1b2n3m4n5v69x8y6_98c7x65y42j21l4j_987sdf654sdg3g6n":
    │  122: resource "aws_alb_listener_rule" "arn_aws_elasticloadbalancing_eu_central_1_999999999999_listener_rule_xyz_xyz_xyz_1b2n3m4n5v69x8y6_98c7x65y42j21l4j_987sdf654sdg3g6n" {
    │
    │ At least 1 "condition" blocks are required.
    ╵
    ╷
    │ Error: Unsupported argument
    │
    │   on module-tst/elastic_load_balancing_v2_alb_nlb.tf line 136, in resource "aws_alb_listener_rule" "arn_aws_elasticloadbalancing_eu_central_1_999999999999_listener_rule_xyz_xyz_xyz_1b2n3m4n5v69x8y6_98c7x65y42j21l4j_987sdf654sdg3g6n":
    │  136:   condition    = var.aws_alb_listener_rule_arn_aws_elasticloadbalancing_eu_central_1_999999999999_listener_rule_xyz_xyz_xyz_1b2n3m4n5v69x8y6_98c7x65y42j21l4j_987sdf654sdg3g6n_condition
    │
    │ An argument named "condition" is not expected here. Did you mean to define a block of type "condition"?
    ╵
    ╷
    

    Anything I can do?

Rclone ("rsync for cloud storage") is a command-line program to sync files and directories to and from different cloud storage providers.
Rclone (

Website | Documentation | Download | Contributing | Changelog | Installation | Forum Rclone Rclone ("rsync for cloud storage") is a command-line progr

Nov 5, 2021
Run your MapReduce workloads as a single binary on a single machine with multiple CPUs and high memory. Pricing of a lot of small machines vs heavy machines is the same on most cloud providers.

gomap Run your MapReduce workloads as a single binary on a single machine with multiple CPUs and high memory. Pricing of a lot of small machines vs he

Sep 16, 2022
The simple and easy-to-use program designed to watch user activity for Cloud Providers.

Cloud Agent The simple and easy-to-use program is designed to watch user activity and possible orphan clusters for Cloud Providers: Gardener GCP (work

Jun 6, 2022
CLI to support with downloading and compiling terraform providers for Mac with M1 chip

m1-terraform-provider-helper A CLI to help with managing the installation and compilation of terraform providers when running a new M1 Mac. Motivation

Jan 2, 2023
Coala-cli-tester: a tool for testing infrastructure of Keenetic Cloud

coala-cli-tester coala-cli-tester is a tool for testing infrastructure of Keenetic Cloud Build go build -ldflags="-s -w" -o ./coala-cli-tester ./*.go

Dec 8, 2021
`tfx` is a standalone CLI for Terraform Cloud and Terraform Enterprise.
`tfx` is a standalone CLI for Terraform Cloud and Terraform Enterprise.

TFx CLI tfx is a standalone CLI for Terraform Cloud and Terraform Enterprise. The initial focus of tfx is to execute the API-Driven workflow for a Wor

Dec 21, 2022
A CLI Tool to easily generate your Terraform configuration

Tf Tf is a command line tool to easily generate your Terraform configuration with an interactive prompt. Inspiration Boredom in Covid-19 Installation

Sep 30, 2022
Speaker command reads aloud the text message. It supports multilingual voice reading

speaker - Read the text aloud speaker command reads aloud the text message. It supports multilingual voice reading. If you want the time signal, the s

Aug 22, 2022
Utility CLI to convert Spring Boot Yaml configuration into external configuration

boot-config-export Utility CLI to convert Spring Boot Yaml configuration into external configuration (as environment variables). The variables are tra

Nov 17, 2021
CLI to migrate Terraform Configuration and State

tfmigrator CLI CLI to migrate Terraform Configuration and State. The migration feature is implemented with tfmigrator/tfmigrator, so please see the do

Dec 14, 2022
A sample FaaS function that gets a stock quote and 30 day history by symbol and returns a HTML page with a generates SVG sparkline.

faas stonks This uses serverless technology to get a stock quote and 30 day sparkline from Yahoo Finance. Deployment Nimbella account Namespace with o

Sep 23, 2021
This is a Go Cli app that receives an string path to a log file, and based on it generates and prints in console an encoded polyline with the locations found in the log file.
This is a Go Cli app that receives an string path to a log file, and based on it generates  and prints in console an encoded polyline with the locations found in the log file.

GEOENCODE GO CLI APP DESCRIPTION This is a Go Cli app that receives an string path to a log file, and based on it generates and prints in console an e

Oct 1, 2021
A component on PolarStack, a hybrid cloud Alibaba Cloud DBaaS product
A component on PolarStack, a hybrid cloud Alibaba Cloud DBaaS product

What is PolarDB Stack Daemon? PolarDB Stack Daemon is a component on PolarStack, a hybrid cloud Alibaba Cloud DBaaS product, and is designed mainly fo

Nov 21, 2021
The Cloud Aviator: TUI client for cloud services (AWS, Vultr, Heroku, Render.com, ...)
The Cloud Aviator: TUI client for cloud services (AWS, Vultr, Heroku, Render.com, ...)

=== T H E C L O U D A V I A T O R === ⠀⠀⠀⠀⠀⠀⠀⠀⢶⣦⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣷⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀

Dec 17, 2022
Command Line Interface for Terraform Enterprise/Cloud ( tecli )
Command Line Interface for Terraform Enterprise/Cloud ( tecli )

In a world where everything is Terraform, teams use Terraform Cloud API to manage their workloads. TECLI increases teams productivity by facilitating such interaction and by providing easy commands that can be executed on a terminal or on CI/CD systems.

Dec 16, 2022
DBT Cloud Terraform Provider

terraform-provider-dbt-cloud Terraform Provider for DBT Cloud Primarily focused on managing jobs in DBT Cloud, given what is available via the API. Da

Dec 11, 2022
:zap: boilerplate template manager that generates files or directories from template repositories
:zap: boilerplate template manager that generates files or directories from template repositories

Boilr Are you doing the same steps over and over again every time you start a new programming project? Boilr is here to help you create projects from

Jan 6, 2023
A CLI tool that generates OpenTelemetry Collector binaries based on a manifest.

OpenTelemetry Collector builder This program generates a custom OpenTelemetry Collector binary based on a given configuration. TL;DR $ go get github.c

Sep 14, 2022