The strongDM provider is used to configure and manage your strongDM account. It provides resources and datasources that allow you to:
- Register gateways
- Enroll databases and servers
- Grant access
- Create and suspend users
- Manage roles
Requirements
Authentication
If you don't already have them you will need to generate a set of API keys, instructions are here: API Credentials
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 so:
provider "sdm" {
api_access_key = "ACCESS_KEY"
api_secret_key = "SECRET_KEY"
}
Basic Example
Create a Gateway
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. So, if you have something to contribute, find a bug, or just want to give us some feedback, please email support@strongdm.com.
Running integration tests
Important: These are integration tests. They will create and destroy real resources in your account!
First clone this repository.
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>"
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