Skip to content
This repository was archived by the owner on Apr 21, 2024. It is now read-only.

Commit 9c976e0

Browse files
committed
documentation update
1 parent 0eeb635 commit 9c976e0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docs/resources/script.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,17 @@ resource "script" "new" {
2121

2222
`script` resource delegates the terraform resource cycle completely to scripts that you provide.
2323

24+
```hcl
25+
resource "script" "new" {
26+
create = ["pwsh", "${path.root}/create.ps1", "-NoLogo"]
27+
read = ["pwsh", "${path.root}/read.ps1", "##ID##", "-NoLogo"]
28+
update = ["pwsh", "${path.root}/update.ps1", "##ID##", "##RES##"]
29+
delete = ["pwsh", "${path.root}/delete.ps1", "##ID##"]
30+
target_state = ["pwsh", "${path.root}/target-state.ps1", "-NoLogo"]
31+
working_dir = path.root
32+
}
33+
```
34+
2435
- Your target state is defined by a single string, it can be anything but I recommend to use a serialized JSON.
2536
- The provider excepts your scripts to work with a simple JSON structure:
2637

0 commit comments

Comments
 (0)