From 0bfcb7fc7c6684014167299b47b568e258424761 Mon Sep 17 00:00:00 2001 From: Andrew Chubatiuk Date: Thu, 4 May 2023 14:13:48 +0300 Subject: [PATCH] fixed docs --- website/docs/d/tunnel.html.markdown | 45 ++++++--------------------- website/docs/index.html.markdown | 48 ++++++++++++++++++++++++----- 2 files changed, 50 insertions(+), 43 deletions(-) diff --git a/website/docs/d/tunnel.html.markdown b/website/docs/d/tunnel.html.markdown index 733dfde..23d0652 100644 --- a/website/docs/d/tunnel.html.markdown +++ b/website/docs/d/tunnel.html.markdown @@ -13,26 +13,27 @@ This data source provides a mechanism for creating an SSH tunnel. ## Example Usage ```hcl -provider "ssh" {} - -data "ssh_tunnel" "consul" { - user = "root" - auth { - private_key { +provider "ssh" { + user = "root" + auth = { + private_key = { content = file(pathexpand("~/.ssh/id_rsa")) } } - server { + server = { host = "localhost" port = 22 } - remote { +} + +data "ssh_tunnel" "consul" { + remote = { port = 8500 } } provider "consul" { - address = data.ssh_tunnel.consul.local.0.address + address = data.ssh_tunnel.consul.local.address scheme = "http" } @@ -48,27 +49,9 @@ data "consul_keys" "keys" { The following arguments are supported: -* `user` - (Optional) SSH connection username. Uses current OS user by default. -* `auth` - (Optional) Configuration block for SSH server auth. Detailed below. -* `server` - (Required) Configuration block for SSH address. Detailed below. * `local` - (Required) Configuration block for local SSH bind address. Detailed below. * `remote` - (Required) Configuration block for remote SSH bind address. Detailed below. -### auth Configuration Block - -The following arguments are supported by the `auth` configuration block: - -* `sock` - (Optional) SSH Agent UNIX socket path. -* `password` - (Optional) SSH server auth password. Conflicts with `auth.0.private_key`. -* `private_key` - (Optional) Configuration block for SSH private key auth. Conflicts with `auth.0.password`. Detailed below. - -### server Configuration Block - -The following arguments are supported by the `server` configuration block: - -* `host` - (Required) SSH server hostname or IP. -* `port` - (Optional) SSH server port. Default port is equal to 22 by default. - ### local Configuration Block The following arguments are supported by the `local` configuration block: @@ -84,11 +67,3 @@ The following arguments are supported by the `remote` configuration block: * `host` - (Optional) remote SSH bind hostname or IP. Default is localhost. * `port` - (Optional) remote SSH bind port. * `socket` - (Optional) remote SSH bind socket - -### private_key Configuration Block - -The following arguments are supported by the `private_key` configuration block: - -* `content` - (Optional) SSH server private key. -* `password` - (Optional) SSH server private key password. -* `certificate` - (Optional) SSH server private key signing certificate. \ No newline at end of file diff --git a/website/docs/index.html.markdown b/website/docs/index.html.markdown index e360cf4..6054224 100644 --- a/website/docs/index.html.markdown +++ b/website/docs/index.html.markdown @@ -15,26 +15,27 @@ Use the navigation to the left to read about the available resources. ## Example Usage ```hcl -provider "ssh" {} - -data "ssh_tunnel" "consul" { +provider "ssh" { user = "root" - auth { - private_key { + auth = { + private_key = { content = file(pathexpand("~/.ssh/id_rsa")) } } - server { + server = { host = "localhost" port = 22 } - remote { +} + +data "ssh_tunnel" "consul" { + remote = { port = 8500 } } provider "consul" { - address = data.ssh_tunnel.consul.local.0.address + address = data.ssh_tunnel.consul.local.address scheme = "http" } @@ -45,3 +46,34 @@ data "consul_keys" "keys" { } } ``` + +## Argument Reference + +The following arguments are supported: + +* `user` - (Optional) SSH connection username. Uses current OS user by default. +* `auth` - (Optional) Configuration block for SSH server auth. Detailed below. +* `server` - (Required) Configuration block for SSH address. Detailed below. + +### auth Configuration Block + +The following arguments are supported by the `auth` configuration block: + +* `sock` - (Optional) SSH Agent UNIX socket path. +* `password` - (Optional) SSH server auth password. Conflicts with `auth.0.private_key`. +* `private_key` - (Optional) Configuration block for SSH private key auth. Conflicts with `auth.0.password`. Detailed below. + +### server Configuration Block + +The following arguments are supported by the `server` configuration block: + +* `host` - (Required) SSH server hostname or IP. +* `port` - (Optional) SSH server port. Default port is equal to 22 by default. + +### private_key Configuration Block + +The following arguments are supported by the `private_key` configuration block: + +* `content` - (Optional) SSH server private key. +* `password` - (Optional) SSH server private key password. +* `certificate` - (Optional) SSH server private key signing certificate.