Coder Social home page Coder Social logo

gcp-stacks-example's Introduction

gcp-stacks-example

This is an example stack configuration for the private preview of Terraform Stacks. Language constructs and features are subject to change given feedback received during this preview. Do not use Stacks for production workloads at this time.

An example Terraform Stack that provisions a Debian virtual machine.

Three components are used:

  • compute leverages the data references of the SSH key and cloud image to create a new Debian resource using the Google provider.

We do not recommend using this example within production accounts. This example will incur [small] costs if provisioned. Please remember to destroy the infrastructure after using this example.

Usage

Prerequisites: You must have a Terraform Cloud account with access to the private preview of Terraform Stacks, a GitHub account, and a GCP Project with Terraform Cloud configured as an OIDC identity provider. Details of all of this are found in the provided Stacks User Guide.

  1. Configure GCP authentication by creating a new service account in the Google Cloud Console (or with Terraform itself!) with the necessary roles (Cloud Storage, Cloud Functions, and API Gateway) and a service account key to allow the role to be assumed by Terraform Cloud (the OIDC identity provider). More details on this step can be found in the Stacks User Guide or in the Dynamic Credentials with the GCP Provider guide.
  2. Fork this repository to your own GitHub account, such that you can edit this stack configuration for your purposes.
  3. Edit your forked stack configuration and change deployments.tfdeploy.hcl to use the public ssh key url, GCP audience, GCP service account email, and GCP project ID you created, as well as an identity token audience value for GCP.
  4. Create a new stack in Terraform Cloud and connect it to your forked configuration repository.
  5. Provision away!

gcp-stacks-example's People

Contributors

alisdair avatar oeghaneyan avatar chrisarcand 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.