Giter Club home page Giter Club logo

terraform-provider-sdm's Introduction

Terraform Provider for StrongDM

You can use the StrongDM Terraform provider to configure and manage your StrongDM account and resources. This project allows you to leverage Terraform to complete the following tasks in StrongDM:

  • Create and register gateways or relays
  • Enroll databases, servers, clusters, and websites
  • Create, manage, and suspend users
  • Grant user and resource access
  • Manage roles
  • Manage access workflows

For more detailed examples using the StrongDM provider and Amazon Web Services (AWS) or Microsoft Azure, check the following resources:

Requirements

Versioning

StrongDM uses semantic versioning. We do not guarantee compatibility between major versions. Be sure to use version constraints to pin your dependency to the desired major version of the StrongDM Terraform provider.

Authentication

If you do not already have them, you must generate a set of API keys.

Environment Variables

You can provide your credentials via the SDM_API_ACCESS_KEY and SDM_API_SECRET_KEY environment variables.

$ export SDM_API_ACCESS_KEY="<ACCESS_KEY>"
$ export SDM_API_SECRET_KEY="<SECRET_KEY>"
$ terraform plan

Provider statement

provider "sdm" {}

Direct

If it is not possible to use environment variables, add the API keys directly to the provider statement as follows:

provider "sdm" {
    api_access_key = "<ACCESS_KEY>"
    api_secret_key = "<SECRET_KEY>"
}

Basic Example

Use the following basic example to create a gateway in StrongDM with the Terraform provider.

resource "sdm_node" "example_gateway" {
    gateway {
        name = "example gateway"
        listen_address = "localhost:5000"
        bind_address = "0.0.0.0:5000"
    }
}
$ terraform plan
$ terraform apply

Useful Links

Contributions

Currently, we are not accepting pull requests directly to this repository, but our users are some of the most resourceful and ambitious folks out there. If you have something to contribute, find a bug, or just want to give us some feedback, please email [email protected].

Running Integration Tests

Important: These are integration tests. They will create and destroy real resources in your account!

  1. First, clone this repository.

  2. In order to run the tests you must set these environment variables so that the provider can authenticate:

$ export SDM_API_ACCESS_KEY="<ACCESS_KEY>"
$ export SDM_API_SECRET_KEY="<SECRET_KEY>"
  1. From the cloned repo, run:
$ cd terraform-provider-sdm
$ TF_ACC=yes go test ./sdm -v -count=1 -mod=vendor

You must set TF_ACC=yes in order to run tests. IF TF_ACC=yes is not set, all tests will pass without any action.

License

Mozilla Public License 2.0

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.