From f208f452aa4f1c31ebc44f2721ef8fb893bbcc06 Mon Sep 17 00:00:00 2001 From: Rucciva Date: Sun, 8 Nov 2020 14:45:43 +0800 Subject: [PATCH] [ci skip] minor doc fix --- docs/resources/script.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/resources/script.md b/docs/resources/script.md index 01d27f3..8dc89b9 100644 --- a/docs/resources/script.md +++ b/docs/resources/script.md @@ -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 @@ -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.