FEATURES OPEN SOURCE ABOUT DOCS LOGIN REGISTER

OpenStack Provider

The OpenStack provider is used to interact with the many resources supported by OpenStack. The provider needs to be configured with the proper credentials before it can be used.

Use the navigation to the left to read about the available resources.

Example Usage

# Configure the OpenStack Provider
provider "openstack" {
    user_name  = "admin"
    tenant_name = "admin"
    password  = "pwd"
    auth_url  = "http://myauthurl:5000/v2.0"
}

# Create a web server
resource "openstack_compute_instance_v2" "test-server" {
    ...
}

Configuration Reference

The following arguments are supported:

Rackspace Compatibility

Using this OpenStack provider with Rackspace is not supported and not guaranteed to work; however, users have reported success with the following notes in mind:

resource "openstack_compute_instance_v2" "my_instance" {
  name = "my_instance"
  region = "DFW"
  image_id = "fabe045f-43f8-4991-9e6c-5cabd617538c"
  flavor_id = "general1-4"
  key_pair = "provisioning_key"

  network {
    uuid = "00000000-0000-0000-0000-000000000000"
    name = "public"
  }

  network {
    uuid = "11111111-1111-1111-1111-111111111111"
    name = "private"
  }
}

If you try using this provider with Rackspace and run into bugs, you are welcomed to open a bug report / issue on Github, but please keep in mind that this is unsupported and the reported bug may not be able to be fixed.

If you have successfully used this provider with Rackspace and can add any additional comments, please let us know.

Testing and Development

In order to run the Acceptance Tests for development, the following environment variables must also be set:

To make development easier, the builtin/providers/openstack/devstack/deploy.sh script will assist in installing and configuring a standardized DevStack environment along with Golang, Terraform, and all development dependencies. It will also set the required environment variables in the devstack/openrc file.

Do not run the deploy.sh script on your workstation or any type of production server. Instead, run the script within a disposable virtual machine. Here’s an example of a Terraform configuration that will create an OpenStack instance and then install and configure DevStack inside.


See the source of this document at Terraform.io