website: documentation tweaks for the local_file resource and its provider
This commit is contained in:
parent
bf8d932d23
commit
4d79e0b99c
|
@ -3,17 +3,18 @@ layout: "local"
|
||||||
page_title: "Provider: Local"
|
page_title: "Provider: Local"
|
||||||
sidebar_current: "docs-local-index"
|
sidebar_current: "docs-local-index"
|
||||||
description: |-
|
description: |-
|
||||||
The Local provider is used to manage local resources (i.e. files).
|
The Local provider is used to manage local resources, such as files.
|
||||||
---
|
---
|
||||||
|
|
||||||
# Local Provider
|
# Local Provider
|
||||||
|
|
||||||
The Local provider is used to manage local resources (i.e. files).
|
The Local provider is used to manage local resources, such as files.
|
||||||
|
|
||||||
Use the navigation to the left to read about the available resources.
|
Use the navigation to the left to read about the available resources.
|
||||||
|
|
||||||
## Example Usage
|
~> **Note** Terraform primarily deals with remote resources which are able
|
||||||
|
to outlive a single Terraform run, and so local resources can sometimes violate
|
||||||
```
|
its assumptions. The resources here are best used with care, since depending
|
||||||
provider "local" {}
|
on local state can make it hard to apply the same Terraform configuration on
|
||||||
```
|
many different local systems where the local resources may not be universally
|
||||||
|
available. See specific notes in each resource for more information.
|
||||||
|
|
|
@ -6,14 +6,20 @@ description: |-
|
||||||
Generates a local file from content.
|
Generates a local file from content.
|
||||||
---
|
---
|
||||||
|
|
||||||
# local\_file
|
# local_file
|
||||||
|
|
||||||
Generates a local file from a given content.
|
Generates a local file with the given content.
|
||||||
|
|
||||||
|
~> **Note** When working with local files, Terraform will detect the resource
|
||||||
|
as having been deleted each time a configuration is applied on a new machine
|
||||||
|
where the file is not present and will generate a diff to re-create it. This
|
||||||
|
may cause "noise" in diffs in environments where configurations are routinely
|
||||||
|
applied by many different users or within automation systems.
|
||||||
|
|
||||||
## Example Usage
|
## Example Usage
|
||||||
|
|
||||||
```
|
```hcl
|
||||||
data "local_file" "foo" {
|
resource "local_file" "foo" {
|
||||||
content = "foo!"
|
content = "foo!"
|
||||||
filename = "${path.module}/foo.bar"
|
filename = "${path.module}/foo.bar"
|
||||||
}
|
}
|
||||||
|
@ -23,8 +29,9 @@ data "local_file" "foo" {
|
||||||
|
|
||||||
The following arguments are supported:
|
The following arguments are supported:
|
||||||
|
|
||||||
* `content` - (required) The content of file to create.
|
* `content` - (Required) The content of file to create.
|
||||||
|
|
||||||
* `filename` - (required) The path of the file to create.
|
* `filename` - (Required) The path of the file to create.
|
||||||
|
|
||||||
NOTE: Any required parent folders are created automatically. Additionally, any existing file will get overwritten.
|
Any required parent directories will be created automatically, and any existing
|
||||||
|
file with the given name will be overwritten.
|
||||||
|
|
Loading…
Reference in New Issue