openstack_compute_servergroup_v2

Manages a V2 Server Group resource within OpenStack.

Example Usage

Compute service API version 2.63 or below:

resource "openstack_compute_servergroup_v2" "test-sg" {
  name     = "my-sg"
  policies = ["anti-affinity"]
}

Compute service API version 2.64 or above:

resource "openstack_compute_servergroup_v2" "test-sg" {
  name     = "my-sg"
  policies = ["anti-affinity"]
  rules {
      max_server_per_host = 3
  }
}

Argument Reference

The following arguments are supported:

Policies

Attributes Reference

The following attributes are exported:

Import

Server Groups can be imported using the id, e.g.

$ terraform import openstack_compute_servergroup_v2.test-sg 1bc30ee9-9d5b-4c30-bdd5-7f1e663f5edf