equinix / terraform-provider-equinix

Terraform Equinix provider
https://deploy.equinix.com/labs/terraform-provider-equinix/
MIT License
46 stars 45 forks source link

`metal_device` and `metal_spot_market_request` inconsistently refer to SSH keys #203

Open grahamc opened 3 years ago

grahamc commented 3 years ago
resource "metal_spot_market_request" "request" {
  instance_parameters {
    project_ssh_keys = []
    user_ssh_keys    = []
  }
}

_keys vs key_ids:

resource "metal_device" "reservation" {
  project_ssh_key_ids              = []
}
displague commented 3 years ago

Thanks for pointing this out @grahamc. It will be great to clear out any API inconsistencies like this while the provider is new.

The process for renaming the attribute is defined here: https://www.terraform.io/docs/extend/best-practices/deprecations.html#renaming-an-optional-attribute, with additional notes about the eventual removal, here: https://www.terraform.io/docs/extend/best-practices/deprecations.html#provider-attribute-rename.

displague commented 3 years ago

I learned that a reason for this discrepancy is that the device creation API endpoint will accept new SSH keys in this field, in the same structured format used when creating SSH keys. I'm not sure if SSH key ids and these structured requests for new keys can be combined in the same request.

I don't know if it makes sense to try to implement support for that API feature at this time.