Skip to content

Commit 37b4646

Browse files
authored
fix(docs): correct config formatting in terraform examples (#7232)
fix(docs): correct config formating in terraform examples (#7219) (cherry picked from commit 7ddfca9)
1 parent c4975ef commit 37b4646

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

docs/reference/action-types/Deploy/terraform.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,8 @@ Example:
377377
spec:
378378
...
379379
backendConfig:
380-
"bucket: ${environment.name\\}-bucket\nkey: tf-state/${local.username\\}/terraform.tfstate"
380+
bucket: ${environment.name}-bucket
381+
key: tf-state/${local.username}/terraform.tfstate
381382
```
382383

383384

docs/reference/module-types/terraform.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,8 @@ Example:
592592

593593
```yaml
594594
backendConfig:
595-
"bucket: ${environment.name\\}-bucket\nkey: tf-state/${local.username\\}/terraform.tfstate"
595+
bucket: ${environment.name}-bucket
596+
key: tf-state/${local.username}/terraform.tfstate
596597
```
597598

598599

docs/reference/providers/terraform.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ Example:
226226
```yaml
227227
providers:
228228
- backendConfig:
229-
"bucket: ${environment.name\\}-bucket\nkey: tf-state/${local.username\\}/terraform.tfstate"
229+
bucket: ${environment.name}-bucket
230+
key: tf-state/${local.username}/terraform.tfstate
230231
```
231232

plugins/terraform/src/helpers.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,11 @@ export const terraformBackendConfigSchema = () =>
4545
4646
If Garden sees that the backend has changes, it'll re-initialize Terraform and set the new values.
4747
`
48-
).example(dedent`
49-
bucket: \$\{environment.name\}-bucket
50-
key: tf-state/\$\{local.username\}/terraform.tfstate
51-
`)
48+
)
49+
.example({
50+
bucket: "${environment.name}-bucket",
51+
key: "tf-state/${local.username}/terraform.tfstate",
52+
})
5253

5354
export const variablesSchema = () => joiStringMap(joi.any())
5455

0 commit comments

Comments
 (0)