From 35da1618ed1b52f5aa38896807d78f584a1e811e Mon Sep 17 00:00:00 2001 From: ianmrose-cm Date: Thu, 23 Jun 2022 12:24:30 -0700 Subject: [PATCH 1/3] Add shell explanation to remote-exec `inline` argument documentation. The current implementation does not use the default shell for the ssh user to execute inline commands, which can be somewhat confusing to debug. Provide explicit documentation to explain this, and documentation can be removed if ssh user default shell is supported. --- .../docs/language/resources/provisioners/remote-exec.mdx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/website/docs/language/resources/provisioners/remote-exec.mdx b/website/docs/language/resources/provisioners/remote-exec.mdx index 769ba72deb..a17f2a3eef 100644 --- a/website/docs/language/resources/provisioners/remote-exec.mdx +++ b/website/docs/language/resources/provisioners/remote-exec.mdx @@ -48,8 +48,10 @@ resource "aws_instance" "web" { The following arguments are supported: -* `inline` - This is a list of command strings. They are executed in the order - they are provided. This cannot be provided with `script` or `scripts`. +* `inline` - This is a list of command strings. Strings are collected in order as + a single `.sh` script which is executed on the remote host. A default shell `#!` + is used unless a `#!` string is the first command, such as `#!/bin/bash`. + This cannot be provided with `script` or `scripts`. * `script` - This is a path (relative or absolute) to a local script that will be copied to the remote resource and then executed. This cannot be provided From a52cf190a6a07a69fa8c6646b24607a7cf4cfc84 Mon Sep 17 00:00:00 2001 From: ianmrose-cm Date: Tue, 28 Jun 2022 09:41:12 -0700 Subject: [PATCH 2/3] Update language according to review feedback. --- website/docs/language/resources/provisioners/remote-exec.mdx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/website/docs/language/resources/provisioners/remote-exec.mdx b/website/docs/language/resources/provisioners/remote-exec.mdx index a17f2a3eef..adebaaeefc 100644 --- a/website/docs/language/resources/provisioners/remote-exec.mdx +++ b/website/docs/language/resources/provisioners/remote-exec.mdx @@ -48,9 +48,8 @@ resource "aws_instance" "web" { The following arguments are supported: -* `inline` - This is a list of command strings. Strings are collected in order as - a single `.sh` script which is executed on the remote host. A default shell `#!` - is used unless a `#!` string is the first command, such as `#!/bin/bash`. +* `inline` - This is a list of command strings. The provisioner uses a default + shell unless you specify a shell as the first command, eg. `#!/bin/bash`. This cannot be provided with `script` or `scripts`. * `script` - This is a path (relative or absolute) to a local script that will From 1e2640367773302eda99257b6b3c35d56a330842 Mon Sep 17 00:00:00 2001 From: Ian Rosenbery <107069272+ianmrose-cm@users.noreply.github.com> Date: Fri, 1 Jul 2022 14:11:33 -0700 Subject: [PATCH 3/3] Update website/docs/language/resources/provisioners/remote-exec.mdx Co-authored-by: Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> --- website/docs/language/resources/provisioners/remote-exec.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/language/resources/provisioners/remote-exec.mdx b/website/docs/language/resources/provisioners/remote-exec.mdx index adebaaeefc..0203231a60 100644 --- a/website/docs/language/resources/provisioners/remote-exec.mdx +++ b/website/docs/language/resources/provisioners/remote-exec.mdx @@ -49,8 +49,8 @@ resource "aws_instance" "web" { The following arguments are supported: * `inline` - This is a list of command strings. The provisioner uses a default - shell unless you specify a shell as the first command, eg. `#!/bin/bash`. - This cannot be provided with `script` or `scripts`. + shell unless you specify a shell as the first command (eg., `#!/bin/bash`). + You cannot provide this with `script` or `scripts`. * `script` - This is a path (relative or absolute) to a local script that will be copied to the remote resource and then executed. This cannot be provided