Giter Club home page Giter Club logo

gcp2terraform's Introduction

gcp2Terraform

CircleCI Maintainability Test Coverage Join the chat at https://gitter.im/gcp2Terraform/community python-version licence MIT

Export existing Google Cloud Platform resources to HashiCorp Configuration Language (HCL , Terraform)

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

Tested with python 3.6.7 Check your python version with :

python3 --version

Installing

from source

git clone --recursive https://github.com/romaric1/gcp2Terraform.git
cd gcp2Terraform
pip install -r requirements.txt

from pypi

to complete

Example

python ./src/import_instances.py romaric-gcp-training
python ./src/import_instances.py google-cloud-platform-project-id

Output

resource "google_compute_instance" "instance-1" {
  name         = "instance-1"
  machine_type = "n1-standard-2"
  zone         = "europe-west1-b"


  tags = ["http-server", "https-server", "web-server"]

  boot_disk {
    auto_delete = "True"
    initialize_params {
      image = "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-9-stretch-v20190116"
      size = "10"
    }
  }


  
  attached_disk {
    source = "https://www.googleapis.com/compute/v1/projects/romaric-gcp-training/zones/europe-west1-b/disks/disk-2"
    mode = "READ_WRITE"
  }
  



labels {

   env = "staging"
}

  network_interface {
    network = "default"

    access_config {
      nat_ip = "35.233.58.78"
    }
  }


service_account {
  
  email = "[email protected]"
  scopes = ["https://www.googleapis.com/auth/devstorage.read_only", "https://www.googleapis.com/auth/logging.write", "https://www.googleapis.com/auth/monitoring.write", "https://www.googleapis.com/auth/servicecontrol", "https://www.googleapis.com/auth/service.management.readonly", "https://www.googleapis.com/auth/trace.append"]
  
}

}

Running the tests

to complete

Break down into end to end tests

to complete

Give an example

And coding style tests

to complete

Give an example

Built With

to complete

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

to complete

Authors

  • *TAVENARD Romaric - Initial work - romaric1

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

gcp2terraform's People

Contributors

gitter-badger avatar romaric1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gcp2terraform's Issues

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.