Skip to content

Commit 7ddfca9

Browse files
authored
fix(docs): correct config formating in terraform examples (#7219)
1 parent 9b22101 commit 7ddfca9

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
@@ -376,7 +376,8 @@ Example:
376376
spec:
377377
...
378378
backendConfig:
379-
"bucket: ${environment.name\\}-bucket\nkey: tf-state/${local.username\\}/terraform.tfstate"
379+
bucket: ${environment.name}-bucket
380+
key: tf-state/${local.username}/terraform.tfstate
380381
```
381382

382383

docs/reference/module-types/terraform.md

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

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

597598

docs/reference/providers/terraform.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,8 @@ 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

232233

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)