How to launch an instance in OpenStack using Terraform

0 votes

Hi Guys,

I am new in Terraform. I have my OpenStack Cloud. I want to launch one instance in OpenStack using Terraform. How can I do that?

Jul 5, 2020 in OpenStack by akhtar
• 38,260 points
1,681 views

1 answer to this question.

0 votes

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.

answered Jul 5, 2020 by MD
• 95,460 points

Related Questions In OpenStack

0 votes
1 answer

How to launch one instance in OpenStack from CLI?

Hi@akhtar, You need to login to your OpenStack ...READ MORE

answered Jul 5, 2020 in OpenStack by MD
• 95,460 points
1,038 views
0 votes
1 answer

How to create an image in OpenStack?

Hi@akhtar, Actually this is the fun in OpenStack. ...READ MORE

answered Mar 16, 2020 in OpenStack by MD
• 95,460 points
2,874 views
0 votes
1 answer

How to update an image properties in OpenStack?

Hi@akhtar, You can update your image properties. Follow ...READ MORE

answered Mar 16, 2020 in OpenStack by MD
• 95,460 points
1,195 views
0 votes
1 answer

How do I configure Block Storage to use an NFS storage back end in OpenStack?

Hi@akhtar, You can use NFS technology for your ...READ MORE

answered Mar 19, 2020 in OpenStack by MD
• 95,460 points
1,382 views
0 votes
1 answer

How to connect OpenStack Cloud with Terraform?

Hi@akhtar, To connect any Cloud, Terraform has a ...READ MORE

answered Jul 5, 2020 in OpenStack by MD
• 95,460 points
1,046 views
0 votes
1 answer

Can anyone explain, how nova works internally?

Hi@akhtar, Nova is comprised of multiple server process, ...READ MORE

answered Mar 17, 2020 in OpenStack by MD
• 95,460 points
1,701 views
0 votes
1 answer

Instance is not pingable from outside in OpenStack!

Ho@akhtar, There is nothing wrong. But when you ...READ MORE

answered Mar 17, 2020 in OpenStack by MD
• 95,460 points
6,422 views
0 votes
1 answer

How to reset error state of a instance into active in OpenStack env?

Hi@akhtar, There are some scenarios where some instances ...READ MORE

answered Mar 17, 2020 in OpenStack by MD
• 95,460 points
9,574 views
0 votes
1 answer

How to create an instance in OpenStack?

Hi@akhtar, When we try to launch an instance ...READ MORE

answered Mar 17, 2020 in OpenStack by anonymous
• 95,460 points
2,633 views
0 votes
1 answer

Not able to launch an instance in OpenStack?

Hi@akhtar, You might get this error because you ...READ MORE

answered Mar 20, 2020 in OpenStack by MD
• 95,460 points
1,715 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP