latitudesh / terraform-provider-latitudesh

Latitude.sh Terraform Provider
https://registry.terraform.io/providers/latitudesh/latitudesh/latest/docs
Mozilla Public License 2.0
10 stars 4 forks source link

Cannot create servers with ssh_keys #46

Closed zheli closed 11 months ago

zheli commented 1 year ago

I couldn't create servers if I specified ssh_keys.

Describe the bug

I got error

│ Inappropriate value for attribute "ssh_keys": a number is required.

If I assign a list of key ids to the server.

Affected Resource(s)

Expected Behavior

Servers are created successfully.

Actual Behavior

Servers are not created and terraform complains.

Steps to Reproduce

  1. Please try the following main.tf
    resource "latitudesh_server" "server" {
    hostname         = "terraform.latitude.sh"
    operating_system = "ubuntu_22_04_x64_lts"
    plan             = "c3.small.x86"
    project          = latitudesh_project.project.id   
    site             = "DAL"
    ssh_keys         = ["{the ssh key id}"]
    }
  2. terraform apply

Terraform Configuration Files

Terraform version

v1.4.6

Debug Output

Panic Output

Additional context

References

zheli commented 1 year ago

I think it probably should use a different schema: https://github.com/latitudesh/terraform-provider-latitudesh/blob/e56fc6615b276d3359258be8d6b8f89caeef6692/latitudesh/resource_server.go#L45C1-L52C6

esoubihe commented 1 year ago

Please see #45 for the suggested syntax and let me know if you're still having issues.

ynhummel commented 11 months ago

@zheli, we've rolled out some updates to improve the server's ssh_keys and project attributes. This should resolve the issue and https://github.com/latitudesh/terraform-provider-latitudesh/issues/45. Therefore, I'll be closing both of them.

Thank you for your feedback. If the problem persists or if you encounter any other issues, please feel free to contact us.