Hi@akhtar,
You need to use openstack_compute_instance_v2 resource to launch an instance in OpenStack. This resource automatically connects to your OpenStack Cloud from Terraform. I have attached one example for your reference.
provider "openstack" {
user_name = "demo"
tenant_name = "demo"
password = "647a07963bf74375"
auth_url = "openstack_url"
region = "RegionOne"
}
resource "openstack_compute_instance_v2" "basic" {
name = "myimage"
image_id = "4892a7c5-dc0d-48cd-bd70-0e6c77bd7668"
flavor_name = "m1.small"
network {
name = "private"
}
}
I hope this will give you some ideas.