Coder Social home page Coder Social logo

rootlyhq / terraformer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from googlecloudplatform/terraformer

0.0 0.0 0.0 71.13 MB

CLI tool to generate terraform files from Rootly

License: Apache License 2.0

Go 98.67% HCL 0.80% JavaScript 0.52% Makefile 0.01%

terraformer's Introduction

Rootly Terraformer

Generate Terraform configuration from Rootly's API. Terraform in reverse.

asciicast

Usage

1. Install

Homebrew

brew tap rootlyhq/homebrew-tap
brew install terraformer-rootly

Download

Terraform 0.13+ is required.

export ARCH=darwin-arm64 # Mac Apple silicon. For Mac Intel silicon use darwin-amd64. For Linux use linux-amd64.
curl -LO "https://github.com/rootlyhq/terraformer/releases/download/$(curl -s https://api.github.com/repos/rootlyhq/terraformer/releases/latest | grep tag_name | cut -d '"' -f 4)/terraformer-rootly-${ARCH}"
chmod +x terraformer-rootly-${ARCH}
sudo mv terraformer-rootly-${ARCH} /usr/local/bin/terraformer-rootly

2. Prepare working directory

Prepare a Terraform working directory with the Rootly provider installed.

If starting from scratch create a versions.tf file:

terraform {
  required_providers {
    rootly = {
      source = "rootlyhq/rootly"
    }
  }
}

and run terraform init to initialize Terraform.

3. Import Terraform configuration

Set the ROOTLY_API_TOKEN environment variable or use --token= CLI flag when running terraformer-rootly.

Import all resources:

terraformer-rootly import rootly --resources=*

Or import specific resources:

terraformer-rootly import rootly --resources=environment,severity

See all available resources using terraformer-rootly import rootly list

Next steps

Generated .tfstate files need to be upgraded to Terraform 0.13+ format:

terraform state replace-provider -auto-approve -- -/rootly rootlyhq/rootly

Development

Upgrade Rootly API support

Run make build, commit changes, and tag with the next semantic version.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.