Skip to content

Commit

Permalink
feat: Make ssh public key name optional in create virtual device request
Browse files Browse the repository at this point in the history
  • Loading branch information
kpdhulipala committed Oct 10, 2024
1 parent 00ff91c commit 1d3e4a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/resources/network_device.md
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ The `secondary_device` block supports the following arguments:
The `ssh_key` block supports the following arguments:

* `username` - (Required) username associated with given key.
* `name` - (Optional) reference by name to previously provisioned public SSH key.
* `name` - (Required) reference by name to previously provisioned public SSH key.

### Cluster Details

Expand Down
7 changes: 2 additions & 5 deletions equinix/resource_network_device.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func resourceNetworkDevice() *schema.Resource {
UpdateContext: resourceNetworkDeviceUpdate,
DeleteContext: resourceNetworkDeviceDelete,
Importer: &schema.ResourceImporter{
State: schema.ImportStatePassthrough,
StateContext: schema.ImportStatePassthroughContext,
},
Schema: createNetworkDeviceSchema(),
Timeouts: &schema.ResourceTimeout{
Expand All @@ -248,10 +248,7 @@ func createNetworkDeviceSchema() map[string]*schema.Schema {
Type: schema.TypeString,
Required: true,
DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool {
if old == new+"-Node0" {
return true
}
return false
return old == new+"-Node0"
},
ValidateFunc: validation.StringLenBetween(3, 50),
Description: neDeviceDescriptions["Name"],
Expand Down

0 comments on commit 1d3e4a8

Please sign in to comment.