Terraform: Openstack provider doesn't update subnet allocation_pools

Created on 28 Dec 2016  ยท  4Comments  ยท  Source: hashicorp/terraform

Hi there,

Terraform fails to update the start and end properties of allocation_pools on openstack_networking_network_v2 resources.

Terraform Version

0.8.2

Affected Resource(s)

  • openstack_networking_subnet_v2.bugreport

Terraform Configuration Files

resource "openstack_networking_network_v2" "bugreport" {
  name           = "bugreport"
  region         = "sal01"
  shared         = "false"
  admin_state_up = "true"
}

resource "openstack_networking_subnet_v2" "bugreport" {
  name        = "bugreport"
  region      = "sal01"
  network_id  = "${openstack_networking_network_v2.bugreport.id}"
  ip_version  = 4
  cidr        = "10.0.1.0/24"
  gateway_ip  = "10.0.1.1"
  enable_dhcp = "true"

  allocation_pools = {
    start = "10.0.1.150"
    end   = "10.0.1.200"
  }
}

Debug Output

https://gist.github.com/cassianoleal/c0c55ca6b1479c971832650dc64927f4

Expected Behavior

Apply should have changed the allocation_pools for the openstack_networking_subnet_v2 resource.

Actual Behavior

Nothing, apparently. allocation_pools were left intact and subsequent plans show the intended changes again.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply
  2. Change allocation_pools start and/or end values
  3. terraform apply
  4. terraform plan
  5. neutron subnet-show bugreport

Obs: After a manual update using neutron subnet-update the plan comes empty as expected.

enhancement

Most helpful comment

@cassianoleal Thank you for reporting this and sorry for the delay.

I've just confirmed that the provider (and the underlying OpenStack library) does not support updating the allocation pools yet. I'll work on getting this added.

All 4 comments

@cassianoleal Thank you for reporting this and sorry for the delay.

I've just confirmed that the provider (and the underlying OpenStack library) does not support updating the allocation pools yet. I'll work on getting this added.

Just faced the same issue. The workaround for me was to change the pool size via Horizon.

Quick update: I've submitted a patch to Gophercloud to support this. Once it's merged, I'll get this into Terraform right away.

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings