Skip to content

Commit

Permalink
Update docs (#123)
Browse files Browse the repository at this point in the history
* Update file.html.md

* Update sensitive_file.html.md

* CHANGELOG update for 2.2.3

* Fix date

* Update CHANGELOG.md

Co-authored-by: Ivan De Marino <ivan.de.marino@gmail.com>
  • Loading branch information
stdtom and detro committed May 18, 2022
1 parent 03a20aa commit 30e4f77
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
12 changes: 12 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,15 @@
## 2.2.3 (May 18, 2022)

NOTES:

* resource/local_file: Update docs to prevent confusion that exactly one of the arguments `content`,
`sensitive_content`, `content_base64`, and `source` needs to be specified ([#123](https://github.com/hashicorp/terraform-provider-local/pull/123)).

* resource/local_sensitive_file: Update docs to prevent confusion that exactly one of the arguments `content`,
`content_base64`, and `source` needs to be specified ([#123](https://github.com/hashicorp/terraform-provider-local/pull/123)).

* No functional changes from 2.2.2.

## 2.2.2 (March 11, 2022)

NOTES:
Expand Down
10 changes: 9 additions & 1 deletion website/docs/r/file.html.md
Expand Up @@ -16,6 +16,10 @@ 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.

~> **Note about file content**
File content must be specified with _exactly_ one of the arguments `content`,
`sensitive_content` (Deprecated), `content_base64`, or `source`.

-> If the file content is sensitive, use the
[`local_sensitive_file`](./sensitive_file.html) resource instead.

Expand All @@ -37,19 +41,23 @@ The following arguments are supported:
If the file already exists, it will be overridden with the given content.

* `content` - (Optional) Content to store in the file, expected to be an UTF-8 encoded string.
Conflicts with `sensitive_content`, `content_base64` and `source`.
Conflicts with `sensitive_content`, `content_base64` and `source`.
Exactly one of these four arguments must be specified.

* `sensitive_content` - (Optional - Deprecated) Sensitive content to store in the file, expected to be an UTF-8 encoded string.
Will not be displayed in diffs.
Conflicts with `content`, `content_base64` and `source`.
Exactly one of these four arguments must be specified.
If in need to use _sensitive_ content, please use the [`local_sensitive_file`](./sensitive_file.html)
resource instead.

* `content_base64` - (Optional) Content to store in the file, expected to be binary encoded as base64 string.
Conflicts with `content`, `sensitive_content` and `source`.
Exactly one of these four arguments must be specified.

* `source` - (Optional) Path to file to use as source for the one we are creating.
Conflicts with `content`, `sensitive_content` and `content_base64`.
Exactly one of these four arguments must be specified.

* `file_permission` - (Optional) Permissions to set for the output file, expressed as string in
[numeric notation](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation).
Expand Down
7 changes: 7 additions & 0 deletions website/docs/r/sensitive_file.html.md
Expand Up @@ -18,6 +18,10 @@ 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.

~> **Note about file content**
File content must be specified with _exactly_ one of the arguments `content`,
`content_base64`, or `source`.

## Example Usage

```hcl
Expand All @@ -37,12 +41,15 @@ The following arguments are supported:

* `content` - (Optional) Sensitive content to store in the file, expected to be an UTF-8 encoded string.
Conflicts with `content_base64` and `source`.
Exactly one of these three arguments must be specified.

* `content_base64` - (Optional) Sensitive content to store in the file, expected to be binary encoded as base64 string.
Conflicts with `content` and `source`.
Exactly one of these three arguments must be specified.

* `source` - (Optional) Path to file to use as source for the one we are creating.
Conflicts with `content` and `content_base64`.
Exactly one of these three arguments must be specified.

* `file_permission` - (Optional) Permissions to set for the output file, expressed as string in
[numeric notation](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation).
Expand Down

0 comments on commit 30e4f77

Please sign in to comment.