Git Product home page Git Product logo

terraspace_plugin_google's Introduction

Terraspace Google Cloud Plugin

Google Cloud support for terraspace.

Installation

Add this line to your application's Gemfile:

gem 'terraspace_plugin_google'

Configure

Optionally configure the plugin. Here's an example google.rb for your terraspace project.

config/plugins/google.rb

TerraspacePluginGoogle.configure do |config|
  config.auto_create = true # set to false to completely disable auto creation
  config.gcs.versioning = true
end

By default:

The settings generally only apply if the gcs bucket does not yet exist yet and is created for the first time.

Versioning

To confirm that the GCS bucket has versioning enabled:

$ gsutil versioning get gs://my-bucket
gs://my-bucket: Enabled
$

Here's also how you list multiple versions of an object.

$ gsutil ls gs://my-bucket
gs://my-bucket/us-central1/
$ echo hello1 > hello.txt
$ gsutil cp hello.txt gs://my-bucket/hello.txt
$ echo hello2 > hello.txt
$ gsutil cp hello.txt gs://my-bucket/hello.txt
$ gsutil ls gs://my-bucket/hello.txt
gs://my-bucket/hello.txt
$ gsutil ls -a gs://my-bucket/hello.txt
gs://my-bucket/hello.txt#1590950916098856
gs://my-bucket/hello.txt#1590950925738834
$ gsutil cp gs://my-bucket/hello.txt#1590950916098856 hello1.txt

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/boltops-tools/terraspace_plugin_google.

terraspace_plugin_google's People

Contributors

tongueroo avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

terraspace_plugin_google's Issues

Support GOOGLE_BACKEND_CREDENTIALS env var

I may be mistaken, but it seems this plugin does not allow the usage of GOOGLE_CREDENTIALS / GOOGLE_BACKEND_CREDENTIALS which is very confusing when the gcs remote state supports loading the service account key from these env vars.

I ran into this issue when trying to migrate our terraform CI to use terraspace instead as we have both of the above env vars defined.

GOOGLE_BACKEND_CREDENTIALS should be used first as the bucket could be in a different project from the GCP resources being deployed.

I'm seeing this with terraspace version 0.6.13 & ruby 2.7.0

Support GCS backend bucket region location

When a new GCS backend bucket is created it defaults to the US multi-region. This behaviour should be configurable so that the backend state bucket can be created in a desired location.

Perhaps needs changes to support the config in :

and the implementation changes in

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.