Skip to content

Repository files navigation

StackGuardian logo

StackGuardian Terraform Provider

Terraform Registry Release License

The StackGuardian Terraform Provider allows Terraform to programmatically interact with the StackGuardian API to help you manage resources on the StackGuardian platform, ultimately enabling organizations to manage cloud infrastructure in a cost-efficient, secure, and compliant way.

Tip

Looking for ready-to-use examples? All StackGuardian Terraform modules and examples are maintained in the terraform-stackguardian-modules repository.

Usage

The provider is available on the Terraform Registry:

terraform {
  required_providers {
    stackguardian = {
      source  = "StackGuardian/stackguardian"
      version = "~> 1.12"
    }
  }
}

provider "stackguardian" {
  api_key  = "<YOUR-API-KEY>"                   # or env var STACKGUARDIAN_API_KEY
  org_name = "<YOUR-ORG-NAME>"                  # or env var STACKGUARDIAN_ORG_NAME
  api_uri  = "https://api.app.stackguardian.io" # or env var STACKGUARDIAN_API_URI; use "https://api.us.stackguardian.io" for the US region
}

resource "stackguardian_workflow_group" "example" {
  resource_name = "Simple-Workflow-Group"
  description   = "Example of how to create a workflow group using the StackGuardian Terraform Provider"
  tags          = ["tf-provider-example", "example"]
}

Documentation

The full list of supported resources and data sources, with documentation for each, is available on the Terraform Registry.

Examples

Development

Requirements:

make build          # compile the provider binary
make install        # build and install into ~/.terraform.d/plugins for local use
make test           # run unit tests
make test-acc       # run acceptance tests (see below)
make docs-generate  # regenerate docs with tfplugindocs
make docs-validate  # validate generated docs

Acceptance tests run against a real StackGuardian organization and require:

export TF_ACC=1
export STACKGUARDIAN_API_KEY=<key>
export STACKGUARDIAN_API_URI=<uri>
export STACKGUARDIAN_ORG_NAME=<org>

Release notes for each version are in the CHANGELOG and on the GitHub releases page.

Contributing

Contributions are welcome — please see CONTRIBUTING.md for guidelines and the Code of Conduct for community standards. Use GitHub issues to report bugs or request features.

License

This project is licensed under the Mozilla Public License 2.0.

About

Terraform provider for StackGuardian

Topics

Resources

Code of conduct

Contributing

Stars

4 stars

Watchers

2 watching

Forks

Releases

Used by

Contributors

Languages