Closed hegerdes closed 1 year ago
Thanks for creating this!
The error seems to be from defining a label on the server. For labels we support only lowercase, or numeric characters.
An example that wouldn't work because of the uppercase L
:
label { key = "Labelkey0" value = "labelvalue0" }
We will add validation on terraform side to make sure this gets caught before reaching backend.
Thanks for the fast reply. And sorry for the inaccurate Issue. I fixed the issue description.
It is in fact a issue with the label name. But I also found that there is also an error with the ssh_keys
param.
ssh_keys = ["scripts/id_rsa.pub"] # Works
ssh_keys = ["~/.ssh/id_rsa.pub"] # Does not work
So there is an error with common UNIX path styles
The ~
is something that will get expanded to the user's home dir in bash
. If you're using a different shell you can get different behavior.
We can mention that we don't support these types of paths. Either a relative or an absolute path should work.
The ~ is something that will get expanded to the user's home dir in bash. If you're using a different shell you can get different behavior.
Didn't know different shells handle this differently. Therfore I can understand your decison to not support it (even though it would have been nice to have). But if this is mentioned in the docs this would be perfect!
Thanks for this super fast PR, would you also be so nice to add client side validation for unsupported paths like these? Currently this is also only catched when applying the infra.
Description
When creating resources with the ionos provider, the provisioning fails when there is a ssh key set with common linux paths. Code Example
Id does not complain on
terraform plan
but as soon as you hitterraform apply
it errors withNote: Using a public ubuntu image
Expected behavior
Create the vm with the ssh key or return a error while planing. Also support UNIX paths as "~/.ssh/id_rsa.pub"
Environment
Terraform version:
Configuration Files
How to Reproduce
Steps to reproduce the behavior:
terraform plan -out plan.out && terraform apply plan.out
Error and Debug Output
Also I got this error. It would be nice if there is more client side validation
Additional Notes
References