Use this provider to manage StackShift projects, environment variables, databases, domains, DNS records, build/deployment actions, compute instances, agency resources, and runbooks from Terraform or OpenTofu.
After the provider is published to the Terraform Registry:
terraform {
required_providers {
stackshift = {
source = "stackshiftCloud/stackshift"
version = "~> 0.1"
}
}
}provider "stackshift" {
endpoint = "https://api.stackshift.cloud"
api_token = var.stackshift_api_token
}You can also set credentials with environment variables:
export STACKSHIFT_API_TOKEN="sspat_..."
export STACKSHIFT_ENDPOINT="https://api.stackshift.cloud"Build the provider:
go build -o terraform-provider-stackshiftPoint Terraform at the local build with ~/.terraformrc:
provider_installation {
dev_overrides {
"registry.terraform.io/stackshiftCloud/stackshift" = "/path/to/terraform-provider-stackshift"
}
direct {}
}- Create a public GitHub repository named
terraform-provider-stackshift. - Add an RSA or DSA GPG signing key to Terraform Registry under the StackShift namespace.
- Add
GPG_PRIVATE_KEYandPASSPHRASErepository secrets in GitHub. - Push a SemVer tag such as
v0.1.0. - GitHub Actions runs GoReleaser and creates a signed GitHub release.
- In Terraform Registry, choose Publish > Provider and select the GitHub repository.
Future releases are detected from GitHub release events after the Registry webhook is installed.