You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/blueprint-designer-guide/blueprints/terraform-grain.md
+28-40Lines changed: 28 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -265,12 +265,12 @@ Liquid templating is supported in the `attributes` values, allowing blueprint in
265
265
### `backend`
266
266
267
267
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:
* The backend must already exist. Torque will not create the backend if it doesn't exist.
@@ -293,44 +293,15 @@ grains:
293
293
key-prefix: "folder1/folder2"
294
294
```
295
295
296
-
__Properties by Backend Type__:
296
+
#### Properties by Backend Type
297
297
298
-
**Common Properties:**
298
+
**Common Properties**
299
299
* __type__: `s3`, `azurerm`, `gcs`, `http`, `remote`, `cloud` (mandatory for all backends)
300
300
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
-
333
301
#### 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)
334
305
335
306
```yaml
336
307
backend:
@@ -341,6 +312,10 @@ __Properties by Backend Type__:
341
312
```
342
313
343
314
#### 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)
344
319
345
320
```yaml
346
321
backend:
@@ -352,6 +327,8 @@ __Properties by Backend Type__:
352
327
```
353
328
354
329
#### gcs
330
+
* __`bucket`__: Mandatory - GCS bucket name for storing state
331
+
* __`key-prefix`__: Optional - Path prefix for the tfstate file (1024 ascii chars limit)
355
332
356
333
```yaml
357
334
backend:
@@ -360,7 +337,9 @@ __Properties by Backend Type__:
360
337
key-prefix: "folder1/folder2"
361
338
```
362
339
340
+
363
341
#### http
342
+
* __`base-address`__: Mandatory - Base URL for the HTTP backend
364
343
365
344
```yaml
366
345
backend:
@@ -369,6 +348,10 @@ __Properties by Backend Type__:
369
348
```
370
349
371
350
#### 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)
372
355
373
356
```yaml
374
357
backend:
@@ -387,7 +370,12 @@ __Properties by Backend Type__:
387
370
* `TF_TOKEN` `env_var`, followed by the hostname (with replace of '.' in '_') is an alternative way to provide a token.
388
371
* For example for the host 'app.terraform.io', the env-var name should be `TF_TOKEN_app_terraform_io`
389
372
373
+
390
374
#### 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)
391
379
392
380
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.
0 commit comments