- Provider source:
s2-streamstore/s2 - GitHub: s2-streamstore/terraform-provider-s2
- Registry: registry.terraform.io/providers/s2-streamstore/s2
- Resources
s2_basins2_streams2_access_token
- Data sources
s2_basins2_stream
resource blocks are managed by Terraform (create/update/delete).data blocks are read-only lookups for existing resources.Prerequisites
- Terraform
>= 1.5.0 - An S2 access token (
S2_ACCESS_TOKEN)
Quickstart
1
Set your credentials
2
Create a Terraform config
3
Initialize and apply
Authentication and Endpoint Configuration
You can configure credentials in provider config or through environment variables:S2_ACCESS_TOKENS2_ACCOUNT_ENDPOINT(optional)S2_BASIN_ENDPOINT(optional, supports{basin}placeholder e.g.{basin}.b.s2.dev)
Resource Examples
Basin with defaults
Stream config
Scoped access token
Import Existing Infrastructure
Import formats:- Basin:
<basin-name> - Stream:
<basin-name>/<stream-name> - Access token:
<token-id>
Using with s2-lite
When targeting s2-lite, set the account endpoint:Access-token API is not supported with s2-lite.
Recommended Workflow
- Pin a provider version in
required_providers. - Commit
.terraform.lock.hcl. - Use
terraform planto preview changes before applying. - Use
terraform importfor existing resources rather than recreating.

