-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updates for connection docs for duckdb, postgres, sqlite, steampipe
- Loading branch information
Showing
4 changed files
with
74 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,15 +11,18 @@ The `steampipe` connection can be used to access a [Steampipe](https://steampipe | |
connection "steampipe" "steampipe_connection" { | ||
host = "localhost" | ||
port = 9193 | ||
db = "steampipe" | ||
username = "steampipe" | ||
password = "mypassword123" | ||
} | ||
``` | ||
|
||
## Arguments | ||
|
||
| Name | Type | Required?| Description | ||
|---------------------|---------|----------|------------------- | ||
| `connection_string` | String | Optional | Full PostreSQL connection string. Defaults to `postgres://[email protected]:9193/steampipe` | ||
| `connection_string` | String | Optional | Full PostgreSQL connection string. Defaults to `postgres://[email protected]:9193/steampipe` | ||
| `db` | String | Optional | Database name. Defaults to `steampipe`. | ||
| `host` | String | Optional | Database hostname. Defaults to `127.0.0.1`. | ||
| `password` | String | Optional | Database password. | ||
| `port` | Number | Optional | Database port. Defaults to `9193`. | ||
|
@@ -32,29 +35,31 @@ connection "steampipe" "steampipe_connection" { | |
|
||
All arguments are optional, and a `steampipe` connection with no arguments will behave the same as the [default connection](#default-connection). | ||
|
||
Typically, you either supply a `connection_string`: | ||
Typically, you supply the `host`, `port`, `db`, `username`, and `password`: | ||
|
||
```hcl | ||
connection "steampipe" "steampipe_connection" { | ||
connection_string = "postgres://steampipe:[email protected]:9193/steampipe" | ||
host = "localhost" | ||
port = 9193 | ||
db = "steampipe" | ||
username = "steampipe" | ||
password = "mypassword123" | ||
} | ||
``` | ||
|
||
Or the `host`, `username`, `password`, etc: | ||
but you may specify a `connection_string` instead: | ||
|
||
```hcl | ||
connection "steampipe" "steampipe_connection" { | ||
host = "localhost" | ||
port = 9193 | ||
username = "steampipe" | ||
password = "mypassword123" | ||
connection_string = "postgres://steampipe:[email protected]:9193/steampipe" | ||
} | ||
``` | ||
|
||
|
||
In either case, the `connection_string` is returned as an attribute. Regardless of the syntax used to define the connection, you can get its connection_string at run time: | ||
|
||
```hcl | ||
pipeeline "example" { | ||
pipeline "example" { | ||
output "connection_string" { | ||
value = connection.steampipe.default.connection_string | ||
} | ||
|