From 800f7d2e06ec3ecff20e774dd2234fb24e2ad1ea Mon Sep 17 00:00:00 2001 From: "jorge.marey" Date: Mon, 22 Feb 2016 17:45:15 +0100 Subject: [PATCH] Update documentation --- .../source/docs/provisioners/file.html.markdown | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/website/source/docs/provisioners/file.html.markdown b/website/source/docs/provisioners/file.html.markdown index be50ed374..368219baa 100644 --- a/website/source/docs/provisioners/file.html.markdown +++ b/website/source/docs/provisioners/file.html.markdown @@ -24,6 +24,12 @@ resource "aws_instance" "web" { destination = "/etc/myapp.conf" } + # Copies the string in content into /tmp/file.log + provisioner "file" { + content = "ami used: ${self.ami}" + destination = "/tmp/file.log" + } + # Copies the configs.d folder to /etc/configs.d provisioner "file" { source = "conf/configs.d" @@ -42,8 +48,14 @@ resource "aws_instance" "web" { The following arguments are supported: -* `source` - (Required) This is the source file or folder. It can be specified as relative - to the current working directory or as an absolute path. +* `source` - This is the source file or folder. It can be specified as relative + to the current working directory or as an absolute path. This cannot be provided with `content`. + +* `content` - This is the content to copy on the destination. If destination is a file, + the content will be written on that file, in case of a directory a file named + *tf-file-content* is created. It's recommended to use a file as destination. A + [`template_file`](/docs/providers/template/r/file.html) might be referenced in here, or + any interpolation syntax for that matter. This cannot be provided with `source`. * `destination` - (Required) This is the destination path. It must be specified as an absolute path.