Skip to content

tristandostaler/terraform-provider-shufflesoar

Repository files navigation

ShuffleSOAR

A terraform provider for https://github.com/frikky/Shuffle

"Buy Me A Coffee"

Using with terraform

# provider.tf
terraform {
  required_providers {
    shufflesoar = {
      source = "tristandostaler/shufflesoar"
    }
  }
}
  • Get the token from environment variables:
# variables.tf
# to setup the shuffle_base_url: export TF_VAR_shuffle_base_url="https://shuffler.io"
# to setup the shuffle_api_token: export TF_VAR_shuffle_api_token=YOURTOKEN
variable "shuffle_base_url" {
  type = string
}

variable "shuffle_api_token" {
  type = string
}
  • Then config the provider:
# main.tf
provider "shufflesoar" {
  shuffle_base_url  = var.shuffle_base_url
  shuffle_api_token = var.shuffle_api_token
}
  • Now you can use it:
# main.tf
resource "shufflesoar_app_authentication" "example" {
  ...
}

Resources

Setup

export TF_PLUGIN_CACHE_DIR="/usr/share/terraform/providers"
export TF_VAR_shuffle_api_token=YOURTOKEN
export TF_VAR_shuffle_base_url="https://shuffler.io"
export TF_LOG=TRACE
sudo mkdir -p /usr/share/terraform/providers
sudo chmod -R 777 /usr/share/terraform/providers
make
make test_tf_clean
# A new AWS app authentication should exist in your shuffle account
make clean
# The app authentication should have been removed