Closed pabl-o-ce closed 2 years ago
After initiating the terraform apply
again, were the instances created/visible in the TransIP dashboard prior to receiving the Failed to set ID for VPS
error? I'm a bit lost on which side this issue arises, as we only throw this error when no unique name can be retrieved from TransIP.
Edit: Side-note @aequitas, I don't think this needs to be retry-able anyway: https://github.com/aequitas/terraform-provider-transip/blob/1a72a5c3bfaa4aab2f5c9b6b8bc16ee5897659a0/resource_transip_vps.go#L233-L234
I will get you some pictures in here:
step 1: [success]
terraform plan -var-file="terraform.tfvars"
step 2: [fails]
terraform apply -var-file="terraform.tfvars"
in this step I was receiving this Error: Failed to set ID for VPS
from like 30 minutes of waiting for creating the vm's
now I only receive a quick response show in the photo above:
mmm... sound that have some issues with the account?
mmm... sound that have some issues with the account?
I'm afraid so, worth trying to create a VPS using the REST API directly:
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer [your JSON web token]" \
-d '
{
"productName": "vps-bladevps-xs",
"availabilityZone": "rtm0",
"description": "defender01",
"operatingSystem": "ubuntu-22.04",
"installFlavour": "installer"
}
' \
"https://api.transip.nl/v6/vps"
If that doesn't work either you've a create case to contact TransIP support. Please report back your findings, I'm rather interested in what exactly went wrong here :)
Maybe it's a race condition where the older VPS with the same name is still lingering on the Transip API side. Creating a new VPS with the same name could maybe create a conflict then. I think this problem is reproducable on my side, maybe even possible to write a test for it. I'll have a look tomorrow.
I thought about that, but isn't the name generated by them in the username-vpsxxxx
format? As we only set the description and need to lookup the name afterwards.
I think this problem is reproducable on my side, maybe even possible to write a test for it.
If you want I can create what I made in a repo so you can test it on your side with your accounts
I'm afraid so, worth trying to create a VPS using the REST API directly
The token from what I read is generate from the control panel website... right? sorry I'm new on TransIP
this is the repo: https://github.com/pabl-o-ce/transip-test If you need it :)
Also I reproduce the same error with 20 minutes of delay:
seems to be a problem of the account guys sorry for the noise.. it was not filled out all information required :)
All works great now [amazing]
Thanks for the support
Hi guys, great work
I was using Terraform for create vm's in TransIP
All works beautiful the first time
then I destroy and try again to create and it take to much time and also end with this error
Error: Failed to set ID for VPS
my instance resource look like this:
is something I'm doing wrong?