diff --git a/docs/data-sources/remotefile.md b/docs/data-sources/remotefile.md index b31f40c..6b8bdf8 100644 --- a/docs/data-sources/remotefile.md +++ b/docs/data-sources/remotefile.md @@ -1,13 +1,14 @@ --- +# generated by https://github.com/hashicorp/terraform-plugin-docs page_title: "remotefile Data Source - terraform-provider-remotefile" subcategory: "" description: |- - Remote file datasource. + File on remote host. --- -# Data Source `remotefile` +# remotefile (Data Source) - Remote file datasource. +File on remote host. ## Example Usage @@ -23,21 +24,37 @@ data "remotefile" "hosts" { } ``` + ## Schema ### Required -- **conn** (Object, Required) Connection to remote host. - - **host** (String, Required) The target host. - - **port** (Number, Optional) The ssh port to the target host. - - **username** (String, Required) The username on the target host. - - **sudo** (Boolean, Optional) Use sudo to gain access to file. - - **password** (String, Optional) The pasword for the user on the target host. - - **private_key** (String, Optional) The private key used to login to the target host. - - **private_key_path** (String, Optional) The local path to the private key used to login to the target host. - - **private_key_env_var** (String, Optional) The name of the local environment variable containing the private key used to login to the target host. -- **path** (String, Required) Path to file on remote host. +- **conn** (Block List, Min: 1) Connection to host where files are located. (see [below for nested schema](#nestedblock--conn)) +- **path** (String) Path to file on remote host. ### Optional -- *none* +- **id** (String) The ID of this resource. + +### Read-Only + +- **content** (String) Content of file. + + +### Nested Schema for `conn` + +Required: + +- **host** (String) The target host. +- **username** (String) The username on the target host. + +Optional: + +- **password** (String, Sensitive) The pasword for the user on the target host. +- **port** (Number) The ssh port to the target host. +- **private_key** (String, Sensitive) The private key used to login to the target host. +- **private_key_env_var** (String) The name of the local environment variable containing the private key used to login to the target host. +- **private_key_path** (String) The local path to the private key used to login to the target host +- **sudo** (Boolean) Use sudo to gain access to file. + + diff --git a/docs/index.md b/docs/index.md index e8707d9..64e9013 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,26 +1,26 @@ --- +# generated by https://github.com/hashicorp/terraform-plugin-docs page_title: "remotefile Provider" subcategory: "" description: |- - Manage files on remote hosts + --- # remotefile Provider + + ## Example Usage ```terraform provider "remotefile" { - max_sessions = 2 + max_sessions = 2 } ``` + ## Schema -### Required - -- *none* - ### Optional -- **max_sessions** (Number, Optional) Maximum number of open sessions in each host connection. +- **max_sessions** (Number) Maximum number of open sessions in each host connection. diff --git a/docs/resources/remotefile.md b/docs/resources/remotefile.md index 047cd88..39838ea 100644 --- a/docs/resources/remotefile.md +++ b/docs/resources/remotefile.md @@ -1,11 +1,12 @@ --- +# generated by https://github.com/hashicorp/terraform-plugin-docs page_title: "remotefile Resource - terraform-provider-remotefile" subcategory: "" description: |- File on remote host. --- -# Resource `remotefile` +# remotefile (Resource) File on remote host. @@ -19,28 +20,41 @@ resource "remotefile" "bashrc" { username = "john" private_key = "" } - path = "/home/john/.bashrc" - content = "alias ll='ls -alF'" + path = "/home/john/.bashrc" + content = "alias ll='ls -alF'" permissions = "0644" } ``` + ## Schema ### Required -- **conn** (Object, Required) Connection to remote host. - - **host** (String, Required) The target host. - - **port** (Number, Optional) The ssh port to the target host. - - **username** (String, Required) The username on the target host. - - **sudo** (Boolean, Optional) Use sudo to gain access to file. - - **password** (String, Optional) The pasword for the user on the target host. - - **private_key** (String, Optional) The private key used to login to the target host. - - **private_key_path** (String, Optional) The local path to the private key used to login to the target host. - - **private_key_env_var** (String, Optional) The name of the local environment variable containing the private key used to login to the target host. -- **path** (String, Required) Path to file on remote host. -- **content** (String, Required) Content of file on remote host. +- **conn** (Block List, Min: 1) Connection to host where files are located. (see [below for nested schema](#nestedblock--conn)) +- **content** (String) Content of file. +- **path** (String) Path to file on remote host. ### Optional -- **permissions** (String, Optional) The file permissions. +- **id** (String) The ID of this resource. +- **permissions** (String) Permissions of file. + + +### Nested Schema for `conn` + +Required: + +- **host** (String) The target host. +- **username** (String) The username on the target host. + +Optional: + +- **password** (String, Sensitive) The pasword for the user on the target host. +- **port** (Number) The ssh port to the target host. +- **private_key** (String, Sensitive) The private key used to login to the target host. +- **private_key_env_var** (String) The name of the local environment variable containing the private key used to login to the target host. +- **private_key_path** (String) The local path to the private key used to login to the target host +- **sudo** (Boolean) Use sudo to gain access to file. + + diff --git a/examples/provider/provider.tf b/examples/provider/provider.tf index 6f95b94..6906f9e 100644 --- a/examples/provider/provider.tf +++ b/examples/provider/provider.tf @@ -1,3 +1,3 @@ provider "remotefile" { - max_sessions = 2 + max_sessions = 2 } diff --git a/examples/resources/remotefile/resource.tf b/examples/resources/remotefile/resource.tf index 53fd577..2fc41a1 100644 --- a/examples/resources/remotefile/resource.tf +++ b/examples/resources/remotefile/resource.tf @@ -5,7 +5,7 @@ resource "remotefile" "bashrc" { username = "john" private_key = "" } - path = "/home/john/.bashrc" - content = "alias ll='ls -alF'" + path = "/home/john/.bashrc" + content = "alias ll='ls -alF'" permissions = "0644" }