GithubHelp home page GithubHelp logo

classicvalues / terraform-provider-credstash Goto Github PK

View Code? Open in Web Editor NEW

This project forked from instructure/terraform-provider-credstash

1.0 0.0 0.0 1023 KB

Terraform provider for secrets stored with credstash

Makefile 2.06% Go 97.94%

terraform-provider-credstash's Introduction

Terraform provider for credstash secrets

CircleCI

Read secrets stored with credstash.

Install

  1. Download the binary for your platform

  2. Create the terraform plugin directory

     $ mkdir ~/.terraform.d/plugins
    
  3. Copy the provider binary to the terraform plugin directory

     $ cp /path/to/terraform-provider-credstash ~/.terraform.d/plugins/terraform-provider-credstash_v0.5.0
    
  4. Profit

From source

$ git clone https://github.com/sspinc/terraform-provider-credstash.git
$ cd /path/to/terraform-provider-credstash
$ make install

Usage

provider "credstash" {
    table  = "credential-store"
    region = "us-east-1"
}

data "credstash_secret" "rds_password" {
    name = "rds_password"
}

data "credstash_secret" "my_secret" {
    name    = "some_secret"
    version = "0000000000000000001"
}

resource "aws_db_instance" "postgres" {
    password = "${data.credstash_secret.rds_password.value}"

    # other important attributes
}

You can override the table on a per data source basis:

data "credstash_secret" "my_secret" {
    table   = "some_table"
    name    = "some_secret"
    version = "0000000000000000001"
}

AWS credentials

AWS credentials are not directly set. Use one of the methods discussed here.

You can set a specific profile to use:

provider "credstash" {
    region  = "us-east-1"
    profile = "my-profile"
}

You can set a specific role arn:

provider "credstash" {
    region  = "us-east-1"
    assume_role {
        role_arn         = "arn:aws:iam::<acccount>:<role name>
        duration_seconds = 600
    }
}

Development

For dependency management Go modules are used thus you will need go 1.11+

  1. Clone the repo git clone https://github.com/sspinc/terraform-provider-credstash.git
  2. Run make test to run all tests

Contributing

  1. Fork the project and clone it locally
  2. Open a feature brach git checkout -b my-awesome-feature
  3. Make your changes
  4. Commit your changes
  5. Push your changes
  6. Open a pull request

terraform-provider-credstash's People

Contributors

flinnb avatar jonasoneves avatar joshuamorris3 avatar lomkju avatar meatballhat avatar tmichel avatar

Stargazers

 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.