Skip to content

Commit

Permalink
Merge branch 'release/v0.3.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
rucciva committed Nov 8, 2020
2 parents 748494b + f208f45 commit bb90a1c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/resources/script.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# linux_script

Manage arbritrary resource by specifying scripts that will be executed remotely on Create|Read|Update|Delete phase.
Manage arbritrary resource by specifying commands that will be executed remotely.

## Example Usage

Expand Down Expand Up @@ -32,10 +32,10 @@ The following arguments are supported:

### lifecycle_commands

Block that contains commands to be remotely executed respectively in **Create**,**Read**,**Update**, and **Delete** phase. For complex commands, use [the file function](https://www.terraform.io/docs/configuration/functions/file.html). The following arguments are supported:
Block that contains commands to be remotely executed respective to terraform's **Create**,**Read**,**Update**, and **Delete** phase. For complex commands, use [the file function](https://www.terraform.io/docs/configuration/functions/file.html). The following arguments are supported:

- `create` - (Required, string) Commands that will be executed in **Create** phase.
- `read` - (Required, string) Commands that will be executed in Read phase and after execution of `create` or `update` commands. Terraform will record the output of these commands inside `output` attributes and trigger update/recreation when it changes (in **Read** phase only). If the result of running these commands produce an error, then it will give a signal for resource recreation. In this scenario, user have three options before applying the changes: (1) do nothing since the resource has indeed become absent, (2) manually modifying the linux machine so no error will be produced in the next run, (3) update the commands. It is recommended that this operations does not do any kind of 'write' operation.
- `read` - (Required, string) Commands that will be executed in **Read** phase and after execution of `create` or `update` commands. Terraform will record the output of these commands inside `output` attributes and trigger update/recreation when it changes (in **Read** phase only). If the result of running these commands produce an error, then it will give a signal for resource recreation. In this scenario, user have three options before applying the changes: (1) do nothing since the resource has indeed become absent, (2) manually modifying the linux machine so no error will be produced in the next run, (3) update the commands. It is recommended that this operations does not do any kind of 'write' operation.
- `update` - (Optional, string) Commands that will be executed in **Update** phase. Previous `output` are accessible from stdin. Omiting this will trigger resource recreation (**Delete** -> **Create**) each time terraform detect changes.
- `delete` - (Required, string) Commands that will be executed in **Delete** phase.

Expand Down

0 comments on commit bb90a1c

Please sign in to comment.