Closed junessi closed 7 years ago
I've hit the same thing. Instance is the main part of all the cloud.
hi, I fixed it by changing the line 1290 of builtin/providers/openstack/resource_openstack_compute_instance_v2.go
from
imageId := server.Image["id"].(string)
to
imageId := server.ID
see my repo: https://github.com/cricketlong/terraform
example code:
provider "openstack" {
user_name = "<your username>"
password = "<your password>"
tenant_name = "eu-de"
domain_name = "OTC00000000001000000XXX"
auth_url = "https://iam.eu-de.otc.t-systems.com:443/v3"
}
resource "openstack_compute_keypair_v2" "test" {
name = "testkey0"
public_key = "<your public key>"
}
resource "openstack_compute_instance_v2" "test" {
name = "lamp"
region = "eu-de"
flavor_name = "s1.medium"
image_id = "de96e213-ba92-4ed9-af21-3edc43c6a4ad"
admin_pass = "password123$"
key_pair = "${openstack_compute_keypair_v2.test.name}"
network {
uuid = "dd834465-98f1-47ab-8da0-8f8465bd24b3"
access_network = true
}
}
Please use the 1.1 code.
I was trying to deploy infrastructures with the code you provided, just replaced my credentials, but I got this error:
Everything was fine except the instance, did you meet this error before? or do you have any solution?