You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`lifecycle_commands` - (Required) see [lifecycle_commands](#lifecycle_commands).
27
-
-`triggers` - (Optional, string map) Attribute that will trigger resource recreation on changes just like the one in [null_resource](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource#triggers). Default empty map.
28
-
-`environment` - (Optional, string map) A list of linux environment that will be available in each `lifecycle_commands`. Default empty map.
29
-
-`sensitive_environment` - (Optional, string map) Just like `environment` except they don't show up in log files. In case of duplication, environment variables defined here will take precedence over the ones in `environment`. Default empty map.
30
27
-`interpreter` - (Optional, string list) Interpreter for running each `lifecycle_commands`. Default empty list.
31
28
-`working_directory` - (Optional, string) The working directory where each `lifecycle_commands` is executed. Default empty string.
29
+
-`environment` - (Optional, string map) A list of linux environment that will be available in each `lifecycle_commands`. Default empty map.
30
+
-`sensitive_environment` - (Optional, string map) Just like `environment` except they don't show up in log files. In case of duplication, environment variables defined here will take precedence over the ones in `environment`. Default empty map.
31
+
-`triggers` - (Optional, string map) Attribute that will trigger resource recreation on changes just like the one in [null_resource](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource#triggers). Default empty map.
32
32
33
33
### lifecycle_commands
34
34
@@ -39,7 +39,9 @@ Block that contains commands to be remotely executed respective to terraform's *
39
39
-`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.
40
40
-`delete` - (Required, string) Commands that will be executed in **Delete** phase.
41
41
42
-
When any of the commands is updated, then nothing will be executed (except for the current `read` commands since it will always be executed before changes are detected). This is to mimic the behavior of an updated provider's logic, that is no previous logics will be executed. If at the same time another arguments is updated, then error will be thrown.
42
+
### Resource Update
43
+
44
+
When any of the `lifecycle_commands` and/or `interpreter` are updated, then nothing will be executed (except for the current `read` commands with existing `interpreter` since it will always be executed before changes are detected). This is to mimic the behavior of an updated provider's instructions, where no previous instructions are executed. Changes to these two arguments must not be followed with changes to other arguments at the same time, or else an error will be thrown.
returnfmt.Errorf("update to `%s` should not be combined with update to other arguments: %s", attrScriptLifecycleCommands, strings.Join(forbidden, ","))
301
+
ifcmd:=h.changedAttrCommands(rd); len(cmd) >0 {
302
+
iffbd:=h.changedAttrInputs(rd); len(fbd) >0 {
303
+
returnfmt.Errorf("update to '%s' should not be combined with update to other arguments: %s",
0 commit comments