From 09e3444a22fec61e4107f061ad4152652b275959 Mon Sep 17 00:00:00 2001 From: Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> Date: Mon, 21 Mar 2022 18:03:18 +0000 Subject: [PATCH 1/2] backport of commit 881fbd1971af4ecf229a06e6afc678f1f0c5beea --- website/docs/language/resources/provisioners/file.mdx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/website/docs/language/resources/provisioners/file.mdx b/website/docs/language/resources/provisioners/file.mdx index 8d8b2ac04440..6ba19b65a0dc 100644 --- a/website/docs/language/resources/provisioners/file.mdx +++ b/website/docs/language/resources/provisioners/file.mdx @@ -8,8 +8,8 @@ description: >- # File Provisioner -The `file` provisioner is used to copy files or directories from the machine -executing Terraform to the newly created resource. The `file` provisioner +The `file` provisioner copies files or directories from the machine +running Terraform to the newly created resource. The `file` provisioner supports both `ssh` and `winrm` type [connections](/language/resources/provisioners/connection). ~> **Important:** Use provisioners as a last resort. There are better alternatives for most situations. Refer to @@ -47,6 +47,8 @@ resource "aws_instance" "web" { } ``` +-> **Note:** When the `file` provisioner is talking to a Windows system over SSH, you must configure OpenSSH to run the commands with `cmd.exe` and not by PowerShell. + ## Argument Reference The following arguments are supported: From 4b27e7439b5a7930aefe8886b075e86537f2c5e7 Mon Sep 17 00:00:00 2001 From: Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> Date: Mon, 21 Mar 2022 18:09:25 +0000 Subject: [PATCH 2/2] backport of commit d74c4972d7c4e74f2ef168d4092f48f4ce121b93 --- website/docs/language/resources/provisioners/file.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/language/resources/provisioners/file.mdx b/website/docs/language/resources/provisioners/file.mdx index 6ba19b65a0dc..7618e3d04d75 100644 --- a/website/docs/language/resources/provisioners/file.mdx +++ b/website/docs/language/resources/provisioners/file.mdx @@ -47,7 +47,7 @@ resource "aws_instance" "web" { } ``` --> **Note:** When the `file` provisioner is talking to a Windows system over SSH, you must configure OpenSSH to run the commands with `cmd.exe` and not by PowerShell. +-> **Note:** When the `file` provisioner communicates with a Windows system over SSH, you must configure OpenSSH to run the commands with `cmd.exe` and not PowerShell. PowerShell causes file parsing errors because it is incompatible with both Unix shells and the Windows command interpreter. ## Argument Reference