Closed zheli closed 11 months ago
Hi @zheli, thank you for opening an issue. Please try the following syntax and let me know if it works for you
resource "latitudesh_server" "server" {
hostname = "terraform.latitude.sh"
operating_system = "ubuntu_22_04_x64_lts"
plan = "s2-small-x86"
project = var.project_id # You can use the project id or slug
site = "DAL"
ssh_keys = [var.ssh_key_id]
}
Make sure you have correctly defined the variables on variables.tf
Alternatively, if you're also managing projects and ssh keys with TF, reference resources like this
resource "latitudesh_server" "server" {
hostname = "terraform.latitude.sh"
operating_system = "ubuntu_22_04_x64_lts"
plan = "s2-small-x86"
project = latitudesh_project.project.id # replace project with the resource name you used on the project.tf file
site = "DAL"
ssh_keys = [latitudesh_ssh_key.ssh_key.id] # replace ssh_key with the resource name you used on the ssh_key.tf file
}
You can find an example integration here: https://docs.latitude.sh/docs/terraform#example-integration
Let me know if that fixes your issue.
I'm closing this issue for the reasons stated in https://github.com/latitudesh/terraform-provider-latitudesh/issues/46. Now, with https://github.com/latitudesh/terraform-provider-latitudesh/releases/tag/v0.2.9, these issues should be solved.
Thank you yet again for your feedback!
Cannot create server using terraform.
Describe the bug
You will get the error below:
Affected Resource(s)
Expected Behavior
Server created successfully.
Actual Behavior
Server created but I can't finish applying the whole project. I can't import project either.
Steps to Reproduce
main.tf
fileterraform apply
Terraform Configuration Files
Terraform version
v1.4.6
Debug Output
https://gist.github.com/zheli/7b142cf8832164f0519b0e1df1138ae5
Panic Output
Additional context
References