diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b4cd30f..ceabab27 100644 --- a/CHANGELOG.md +++ b/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: diff --git a/website/docs/r/file.html.md b/website/docs/r/file.html.md index 2ccf66b3..ac777805 100644 --- a/website/docs/r/file.html.md +++ b/website/docs/r/file.html.md @@ -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. @@ -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). diff --git a/website/docs/r/sensitive_file.html.md b/website/docs/r/sensitive_file.html.md index d3f69ba4..bc6eed01 100644 --- a/website/docs/r/sensitive_file.html.md +++ b/website/docs/r/sensitive_file.html.md @@ -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 @@ -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).