Skip to content

Commit

Permalink
Generate documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
tenstad committed Aug 4, 2021
1 parent 4860dfd commit 99872ef
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 39 deletions.
45 changes: 31 additions & 14 deletions docs/data-sources/remotefile.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -23,21 +24,37 @@ data "remotefile" "hosts" {
}
```

<!-- schema generated by tfplugindocs -->
## 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.

<a id="nestedblock--conn"></a>
### 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.


14 changes: 7 additions & 7 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -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 generated by tfplugindocs -->
## 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.
44 changes: 29 additions & 15 deletions docs/resources/remotefile.md
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -19,28 +20,41 @@ resource "remotefile" "bashrc" {
username = "john"
private_key = "<ssh private key>"
}
path = "/home/john/.bashrc"
content = "alias ll='ls -alF'"
path = "/home/john/.bashrc"
content = "alias ll='ls -alF'"
permissions = "0644"
}
```

<!-- schema generated by tfplugindocs -->
## 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.

<a id="nestedblock--conn"></a>
### 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.


2 changes: 1 addition & 1 deletion examples/provider/provider.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
provider "remotefile" {
max_sessions = 2
max_sessions = 2
}
4 changes: 2 additions & 2 deletions examples/resources/remotefile/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ resource "remotefile" "bashrc" {
username = "john"
private_key = "<ssh private key>"
}
path = "/home/john/.bashrc"
content = "alias ll='ls -alF'"
path = "/home/john/.bashrc"
content = "alias ll='ls -alF'"
permissions = "0644"
}

0 comments on commit 99872ef

Please sign in to comment.