Skip to content

Commit

Permalink
drop host key from ssh scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
corpix committed Aug 14, 2022
1 parent 578fc49 commit 5fd56f7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
1 change: 0 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ Optional:

- `bastion` (Block Set, Max: 1) SSH configuration for bastion server (see [below for nested schema](#nestedblock--ssh--bastion))
- `config` (Map of String) SSH configuration map
- `host` (String) SSH remote hostname
- `port` (Number) SSH remote port
- `user` (String) SSH remote user name

Expand Down
1 change: 0 additions & 1 deletion docs/resources/instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ Optional:

- `bastion` (Block Set, Max: 1) SSH configuration for bastion server (see [below for nested schema](#nestedblock--ssh--bastion))
- `config` (Map of String) SSH configuration map
- `host` (String) SSH remote hostname
- `port` (Number) SSH remote port
- `user` (String) SSH remote user name

Expand Down
17 changes: 11 additions & 6 deletions provider/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,6 @@ const (

var (
ProviderSchemaSshMap = map[string]*schema.Schema{
KeySshHost: {
Description: "SSH remote hostname",
Type: schema.TypeString,
Optional: true,
},
KeySshUser: {
Description: "SSH remote user name",
Type: schema.TypeString,
Expand All @@ -117,6 +112,16 @@ var (
DefaultFunc: DefaultSshConfig,
},
}
ProviderSchemaBastionMap = SchemaMapExtend(
ProviderSchemaSshMap,
map[string]*schema.Schema{
KeySshHost: {
Description: "SSH remote hostname",
Type: schema.TypeString,
Optional: true,
},
},
)
ProviderSchemaSsh = SchemaWithDefaultFuncCtr(DefaultMapFromSchema, &schema.Schema{
Description: "SSH protocol settings",
Type: schema.TypeSet,
Expand All @@ -130,7 +135,7 @@ var (
Type: schema.TypeSet,
MaxItems: 1,
Elem: &schema.Resource{
Schema: ProviderSchemaSshMap,
Schema: ProviderSchemaBastionMap,
},
Optional: true,
},
Expand Down

0 comments on commit 5fd56f7

Please sign in to comment.