Skip to content

Commit 0471d02

Browse files
committed
fix: update backend documentation for Terraform grain with improved clarity and formatting
1 parent 00a01f3 commit 0471d02

1 file changed

Lines changed: 28 additions & 40 deletions

File tree

docs/blueprint-designer-guide/blueprints/terraform-grain.md

Lines changed: 28 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -265,12 +265,12 @@ Liquid templating is supported in the `attributes` values, allowing blueprint in
265265
### `backend`
266266

267267
When launching the environment, Torque creates a tfstate file for each Terraform grain in the blueprint. By default, the state is saved locally on the PVC of the grain runner (volume for Docker agents). However, Torque allows you to optionally choose to save the terraform state in a backend of your choice. Torque supports the following backends:
268-
* __[S3](https://developer.hashicorp.com/terraform/language/settings/backends/s3)__
269-
* __[gcs](https://developer.hashicorp.com/terraform/language/settings/backends/gcs)__
270-
* __[azurerm](https://developer.hashicorp.com/terraform/language/settings/backends/azurerm)__
271-
* __[http](https://developer.hashicorp.com/terraform/language/settings/backends/http)__
272-
* __[remote](https://developer.hashicorp.com/terraform/language/backend/remote)__
273-
* __[cloud](https://developer.hashicorp.com/terraform/cli/cloud/settings#the-cloud-block)__
268+
* [S3](https://developer.hashicorp.com/terraform/language/settings/backends/s3)
269+
* [GCS](https://developer.hashicorp.com/terraform/language/settings/backends/gcs)
270+
* [Azure RM](https://developer.hashicorp.com/terraform/language/settings/backends/azurerm)
271+
* [HTTP](https://developer.hashicorp.com/terraform/language/settings/backends/http)
272+
* [Remote](https://developer.hashicorp.com/terraform/language/backend/remote)
273+
* [Cloud](https://developer.hashicorp.com/terraform/cli/cloud/settings#the-cloud-block)
274274

275275
__Prerequisites:__
276276
* The backend must already exist. Torque will not create the backend if it doesn't exist.
@@ -293,44 +293,15 @@ grains:
293293
key-prefix: "folder1/folder2"
294294
```
295295

296-
__Properties by Backend Type__:
296+
#### Properties by Backend Type
297297

298-
**Common Properties:**
298+
**Common Properties**
299299
* __type__: `s3`, `azurerm`, `gcs`, `http`, `remote`, `cloud` (mandatory for all backends)
300300

301-
**S3 Backend:**
302-
* __bucket__: Mandatory - S3 bucket name for storing state
303-
* __region__: Mandatory - AWS region where the bucket is located
304-
* __key-prefix__: Optional - Path prefix for the tfstate file (1024 ascii chars limit)
305-
306-
**Azure RM Backend:**
307-
* __resource-group-name__: Mandatory - Azure resource group name
308-
* __storage-account-name__: Mandatory - Azure storage account name
309-
* __container-name__: Mandatory - Azure blob container name
310-
* __key-prefix__: Optional - Path prefix for the tfstate file (1024 ascii chars limit)
311-
312-
**GCS Backend:**
313-
* __bucket__: Mandatory - GCS bucket name for storing state
314-
* __key-prefix__: Optional - Path prefix for the tfstate file (1024 ascii chars limit)
315-
316-
**HTTP Backend:**
317-
* __base-address__: Mandatory - Base URL for the HTTP backend
318-
319-
**Remote Backend:**
320-
* __hostname__: Optional - Terraform Enterprise hostname (defaults to app.terraform.io)
321-
* __organization__: Mandatory - Terraform Enterprise organization name
322-
* __workspaces__: Mandatory - Workspace configuration (name or prefix)
323-
* __token__: Optional - Authentication token (can be provided via environment variable)
324-
325-
**Cloud Backend:**
326-
* __hostname__: Optional - Terraform Cloud hostname (defaults to app.terraform.io)
327-
* __organization__: Mandatory - Terraform Cloud organization name
328-
* __workspaces__: Mandatory - Workspace configuration (name or prefix)
329-
* __token__: Optional - Authentication token (can be provided via environment variable)
330-
331-
**Example configurations for each backend type**
332-
333301
#### s3
302+
* __`bucket`__: Mandatory - S3 bucket name for storing state
303+
* __`region`__: Mandatory - AWS region where the bucket is located
304+
* __`key-prefix`__: Optional - Path prefix for the tfstate file (1024 ascii chars limit)
334305

335306
```yaml
336307
backend:
@@ -341,6 +312,10 @@ __Properties by Backend Type__:
341312
```
342313

343314
#### azurerm
315+
* __`resource-group-name`__: Mandatory - Azure resource group name
316+
* __`storage-account-name`__: Mandatory - Azure storage account name
317+
* __`container-name`__: Mandatory - Azure blob container name
318+
* __`key-prefix`__: Optional - Path prefix for the tfstate file (1024 ascii chars limit)
344319

345320
```yaml
346321
backend:
@@ -352,6 +327,8 @@ __Properties by Backend Type__:
352327
```
353328

354329
#### gcs
330+
* __`bucket`__: Mandatory - GCS bucket name for storing state
331+
* __`key-prefix`__: Optional - Path prefix for the tfstate file (1024 ascii chars limit)
355332

356333
```yaml
357334
backend:
@@ -360,7 +337,9 @@ __Properties by Backend Type__:
360337
key-prefix: "folder1/folder2"
361338
```
362339

340+
363341
#### http
342+
* __`base-address`__: Mandatory - Base URL for the HTTP backend
364343

365344
```yaml
366345
backend:
@@ -369,6 +348,10 @@ __Properties by Backend Type__:
369348
```
370349

371350
#### remote
351+
* __`hostname`__: Optional - Terraform Enterprise hostname (defaults to app.terraform.io)
352+
* __`organization`__: Mandatory - Terraform Enterprise organization name
353+
* __`workspaces`__: Mandatory - Workspace configuration (name or prefix)
354+
* __`token`__: Optional - Authentication token (can be provided via environment variable)
372355

373356
```yaml
374357
backend:
@@ -387,7 +370,12 @@ __Properties by Backend Type__:
387370
* `TF_TOKEN` `env_var`, followed by the hostname (with replace of '.' in '_') is an alternative way to provide a token.
388371
* For example for the host 'app.terraform.io', the env-var name should be `TF_TOKEN_app_terraform_io`
389372

373+
390374
#### cloud
375+
* __`hostname`__: Optional - Terraform Cloud hostname (defaults to app.terraform.io)
376+
* __`organization`__: Mandatory - Terraform Cloud organization name
377+
* __`workspaces`__: Mandatory - Workspace configuration (name or prefix)
378+
* __`token`__: Optional - Authentication token (can be provided via environment variable)
391379

392380
The `cloud` backend configuration allows you to use [Terraform Cloud](https://developer.hashicorp.com/terraform/cli/cloud/settings#the-cloud-block) for remote state management. This is particularly useful when migrating from Terraform Cloud to Torque or when you need to manage state using a third-party service.
393381

0 commit comments

Comments
 (0)