> ## Documentation Index
> Fetch the complete documentation index at: https://cloud.strettch.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Terraform Provider

> Provision and manage your Strettch Cloud infrastructure as code with the official Strettch Cloud Terraform provider.

The official [Strettch Cloud Terraform provider](https://registry.terraform.io/providers/strettch-cloud/strettchcloud/latest) lets you define and provision your Strettch Cloud infrastructure with Terraform.

> [card] [Quickstart](https://cloud.strettch.com/docs/terraform/quickstart.md)
>
> Go from zero to a running compute instance in a few minutes.

> [card] [Terraform Registry](https://registry.terraform.io/providers/strettch-cloud/strettchcloud/latest/docs)
>
> The full resource and data-source reference.

> [card] [Source on GitHub](https://github.com/strettch-cloud/terraform-provider-strettchcloud)
>
> Browse the code, open issues, and contribute.

***

## Why Terraform?

> [card] Infrastructure as code
>
> Describe your compute instances in version-controlled configuration instead of clicking through the console.

> [card] Reproducible environments
>
> Spin up identical staging and production environments from the same definition.

> [card] Safe changes
>
> Preview every change with `terraform plan` before it touches your infrastructure.

> [card] Fits your workflow
>
> Run plans and applies from CI/CD, alongside the rest of your Terraform.

![](https://mintcdn.com/strettch/nMDoG2FUUG4QADX_/images/terraform/terraform-workflow.png?fit=max\&auto=format\&n=nMDoG2FUUG4QADX_\&q=85\&s=6739c7b866ea35d0044a5a9436609e10)

***

## What you can manage

* **Compute instances** (`strettchcloud_compute`) — create, update, resize, reboot, and destroy virtual machines.
* **Catalog lookups** — resolve the available images, regions, and specifications as data sources, so you never hardcode a slug that might change.

***

## Add the provider

```hcl theme={null}
terraform {
  required_providers {
    strettchcloud = {
      source  = "strettch-cloud/strettchcloud"
      version = "~> 1.0"
    }
  }
}

provider "strettchcloud" {
  # api_key is read from the STRETTCH_CLOUD_API_KEY environment variable.
}
```

> [!NOTE]
>
> Keep your API key out of your configuration files. Set it as the **`STRETTCH_CLOUD_API_KEY`** environment variable, and store it as a secret in CI.

***

## Provider configuration

Every argument is optional, and each can be set with the matching **`STRETTCH_CLOUD_*`** environment variable. In practice you only set `api_key` — and even that is read from the environment by default (see [Authentication](https://cloud.strettch.com/docs/terraform/authentication.md)).

**api\_key** `string` *required*

API key, sent as a bearer token. Read from **`STRETTCH_CLOUD_API_KEY`** by default. Sensitive — keep it out of configuration files.

**api\_url** `string` (default: [https://api.strettch.cloud/api/v1](https://api.strettch.cloud/api/v1))

Base URL of the Strettch Cloud API. Also set with **`STRETTCH_CLOUD_API_URL`**.

**requests\_per\_second** `number` (default: 2)

Client-side rate limit. Higher values are capped to the API ceiling of `2`. Also set with **`STRETTCH_CLOUD_REQUESTS_PER_SECOND`**.

**http\_retry\_max** `number` (default: 4)

Maximum retries after the first attempt for retryable failures. Also set with **`STRETTCH_CLOUD_HTTP_RETRY_MAX`**.

**http\_retry\_wait\_min** `number` (default: 1)

Minimum backoff, in seconds, before the first retry. Also set with **`STRETTCH_CLOUD_HTTP_RETRY_WAIT_MIN`**.

**http\_retry\_wait\_max** `number` (default: 30)

Maximum backoff, in seconds, between retries. Also set with **`STRETTCH_CLOUD_HTTP_RETRY_WAIT_MAX`**.

***

Ready to deploy something? Head to the [Quickstart](https://cloud.strettch.com/docs/terraform/quickstart.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.