GithubHelp home page GithubHelp logo

isabella232 / terraform-spotinst-connect-gcp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kchou94/terraform-spotinst-connect-gcp

0.0 0.0 0.0 11 KB

A Terraform module to connect Google Cloud Platform (GCP) accounts to the Spot platform.

Home Page: https://registry.terraform.io/modules/spotinst/connect-gcp/spotinst

License: Apache License 2.0

Shell 1.73% Python 30.85% HCL 67.42%

terraform-spotinst-connect-gcp's Introduction

Terraform GCP Examples for Spot.io

Introduction

Example Terraform for Spot.io

Example

#Call the spot module to create a Spot account and link project to the platform
module "gcp_connect_project1" {
    source = "stevenfeltner/gcp-connect/spotinst"
    project = "project1"
}
#Connect a second project
module "gcp_connect_project2" {
  source = "stevenfeltner/gcp-connect/spotinst"
  project = "project2"
}
output "spot_account_id" {
    value = module.gcp_connect_project1.spot_account_id
}
output "spot_account_id2" {
  value = module.gcp_connect_project2.spot_account_id
}

Details

The module will aid in automatically connecting your GCP project to Spot via terraform. This will also leverage a python script to create the Spot account within your Spot Organization and attach the GCP service account credential.

Pre-Reqs

  • Spot Organization Admin API token. This is required to be added as an environment variable stored in SPOTINST_TOKEN.
  • Python 3 installed.

Run

This terraform module will do the following:

On Apply:

  • Create GCP Service Account
  • Create GCP Service Account Key
  • Create GCP Project Role
  • Create Spot Account within Spot Organization
  • Assign Project Role to Service Account
  • Provide GCP Service Account Key to newly created Spot Account

On Destroy: Remove all above resources including deleting the Spot Account

terraform-spotinst-connect-gcp's People

Contributors

stevenfeltner avatar

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.