terraform-credentials-gcs

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2020 License: GPL-3.0 Imports: 1 Imported by: 0

README

Terrafrom credentials helper for Google Cloud Storage

terraform-credentials-gcs is a Terraform "credentials helper" plugin that allows providing credentials for Terraform-native services (private module registries, Terraform Cloud, etc) publish in private Google Cloud Storage bucket.

To use it, download a release archive and extract it into the ~/.terraform.d/plugins directory where Terraform looks for credentials helper plugins. (The filename of the file inside the archive is important for Terraform to discover it correctly, so don't rename it).

Terraform will take the newest version of the plugin it finds in the plugin search directory, so if you are switching between versions you may prefer to remove existing installed versions in order to ensure Terraform selects the desired version.

Once you've installed the plugin, enable it by adding the following block to your Terraform CLI configuration: credentials_helper "gcs" {}.

This credentials helper plugin does not take any additional arguments, so the block must be left empty as shown above.

To enable authentication on Google Cloud Storage, use at least:

  • Use gcloud with gcloud auth login --update-adc --no-launch-browser
  • export GOOGLE_APPLICATION_CREDENTIALS=/path/to/your/service/account/file.json: file path
  • export GOOGLE_CREDENTIALS=$(cat /path/to/your/service/account/file.json | tr -d "\n"): file content

This will provided authentication to golang.org/x/oauth2/google wich understand these methods. See https://cloud.google.com/docs/authentication/production.

This helper will store credentials for registries in $HOME/.config/terraform-credentials-gcs.

Documentation

Overview

Copyright © 2020 Quentin Lemaire <quentin@lemairepro.fr>

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL