Skip to content

pruneops Provider

Manage a PruneOps organization: cloud accounts, their resource policy and Terraform state configs.

Example Usage

terraform {
  required_version = ">= 1.11" # write-only credentials
  required_providers {
    pruneops = {
      source = "registry.pruneops.run/pruneops/pruneops"
    }
  }
}

# The token from Organization → Integrations → API Tokens, here kept in AWS
# SSM Parameter Store. An ephemeral resource keeps it out of the state and
# the plan. Leave api_token out to read the PRUNEOPS_API_TOKEN environment
# variable instead.
ephemeral "aws_ssm_parameter" "pruneops_token" {
  arn = "arn:aws:ssm:eu-west-1:123456789012:parameter/pruneops/api_token"
}

provider "pruneops" {
  api_token = ephemeral.aws_ssm_parameter.pruneops_token.value
}

Schema

Optional

  • api_token (String, Sensitive) API token, created under Organization → Integrations → API Tokens. It also selects the organization. Defaults to the PRUNEOPS_API_TOKEN environment variable.
  • base_url (String) PruneOps URL. Defaults to the PRUNEOPS_BASE_URL environment variable, then https://www.pruneops.run.