Skip to content

Commit e362d8b

Browse files
committed
(PUP-9747) update bolt transport key description
* Emphasise source of design constraint * Emphasise recommendation to use these keys when applicable * Add `password` key following feedback from the bolt team * Add note on bolt behaviour of `uri` vs `name`
1 parent 3ae711f commit e362d8b

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

language/resource-api/README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -432,23 +432,26 @@ Password attributes should also set `sensitive: true` to ensure that the data is
432432
433433
#### Schema
434434
435-
A transport schema accepts the following keywords:
435+
To line up with [bolt's inventory file](https://puppet.com/docs/bolt/latest/inventory_file.html), a transport schema should prefer the following keywords when relevant:
436436
437-
* `uri`: use when you need to specify a specific URL to connect to. All of the following keys will be computed from the `uri` when possible. In the future more url parts may be computed from the URI.
438-
* `host`: use to specify an IP or address to connect to.
437+
* `uri`: use when you need to specify a specific URL to connect to. Bolt will compute the following keys from the `uri` when possible. In the future more url parts may be computed from the URI.
439438
* `protocol`: use to specify which protocol the transport should use for example `http`, `https`, `ssh` or `tcp`.
440-
* `user`: the user the transport should connect as.
439+
* `host`: use to specify an IP or address to connect to.
441440
* `port`: the port the transport should connect to.
441+
* `user`: the user the transport should connect as.
442+
* `password`: the password for the specified user.
442443
443444
Do not use the following keywords when writing a schema:
444445
446+
* `implementations`: reserved by Bolt.
445447
* `name`: transports should use `uri` instead of name.
446448
* `path`: reserved as a uri part.
447449
* `query`: reserved as a uri part.
448-
* `run-on`: This is used by Bolt to determine which target to proxy to. Transports should not rely on this key.
449-
* `remote-transport`: This is used to determine which transport to load. It should always be the transport class named "declassified".
450450
* `remote-*`: any key starting with `remote-` is reserved for future use.
451-
* `implementations`: reserved by Bolt.
451+
* `remote-transport`: This is used to determine which transport to load. It should always be the transport class named "declassified".
452+
* `run-on`: This is used by Bolt to determine which target to proxy to. Transports should not rely on this key.
453+
454+
> Note: Currently bolt inventory requires that a name be set for every target and always uses that name as the URI. This means there is no way to specify `host` separately from the host section of the `name` when parsed as a URI.
452455
453456
#### Implementation
454457

0 commit comments

Comments
 (0)