Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Openstack provider boolean values create a change #1741

Closed
cvvs opened this issue Apr 29, 2015 · 1 comment · Fixed by #1745
Closed

Openstack provider boolean values create a change #1741

cvvs opened this issue Apr 29, 2015 · 1 comment · Fixed by #1745
Assignees

Comments

@cvvs
Copy link

cvvs commented Apr 29, 2015

I'm going to use subnet in the example, but this happens with other boolean values in the Openstack provider, such as "admin_state_up" in the router resource.

Any time I set a boolean value to true in the config, the terraform plan reports that it will change from "true" => "1"

Here's the resource definition (fixed to note that we actually use true, not 1)

resource "openstack_networking_subnet_v2" "subnet-internal" {
    network_id = "${openstack_networking_network_v2.network-internal.id}"
    tenant_id = "${var.tenant_id}"
    region = "${var.openstack_region}"
    cidr = "${var.internal_cidr}"
    gateway_ip = "${var.internal_gateway}"
    enable_dhcp = true
    dns_nameservers = ["${split(" ", var.dns_nameservers)}"]
    ip_version = 4
    allocation_pools = {
        "start" = "${var.internal_dhcp_start}"
        "end" = "${var.internal_dhcp_end}"
   }
}

Here's the current state:

"openstack_networking_subnet_v2.subnet-internal": {
    "type": "openstack_networking_subnet_v2",
    "depends_on": [
        "openstack_networking_network_v2.network-internal"
    ],
    "primary": {
        "id": "d2cc8a10-2e74-400a-8720-9951e6dafc39",
        "attributes": {
            "allocation_pools.#": "1",
            "allocation_pools.0.end": "192.168.222.254",
            "allocation_pools.0.start": "192.168.222.100",
            "cidr": "192.168.222.0/24",
            "dns_nameservers.#": "2",
            "dns_nameservers.3811298194": "8.8.4.4",
            "dns_nameservers.3817307869": "8.8.8.8",
            "enable_dhcp": "true",
            "gateway_ip": "192.168.222.1",
            "host_routes.#": "0",
            "id": "d2cc8a10-2e74-400a-8720-9951e6dafc39",
            "ip_version": "4",
            "name": "",
            "network_id": "0ba33147-2340-467d-b691-255921cf7a89",
            "region": "foo",
            "tenant_id": "f79b28dcf6b34b0a8c847a5e35ffcd05"
        }
    }
}

This is the output of terraform plan

~ openstack_networking_subnet_v2.subnet-internal
       enable_dhcp: "true" => "1"
@mitchellh mitchellh self-assigned this Apr 30, 2015
mitchellh added a commit that referenced this issue Apr 30, 2015
provider/openstack: enable_dhcp should be bool [GH-1741]
catsby added a commit that referenced this issue May 1, 2015
…oup-remove-default-egress

* upstream/master: (24 commits)
  helper/resource: fix accidentaly swallowing of acctest step errors
  Update CHANGELOG.md
  providers/aws: Implements DHCP Options Set support.
  update CHANGELOG
  update CHANGELOG
  Update CHANGELOG.md
  Update CHANGELOG.md
  Update CHANGELOG.md
  core: fix targeting with non-word chars
  update CHANGELOG
  update CHANGELOG
  docs: Fix styling in provider code block
  provider/openstack: enable_dhcp should be bool [GH-1741]
  config: add module raw configs to InterpolatedConfigs [GH-1448]
  terraform: EvalDeleteOutput and context test
  terraform: add output orphan transformer
  providers/aws: add source_security_group to elb
  core: graph command gets -verbose and -draw-cycles
  core: fix targeting in destroy w/ provisioners
  core: validate on verbose graph to detect some cycles earlier
  ...
@ghost
Copy link

ghost commented May 3, 2020

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.

@ghost ghost locked and limited conversation to collaborators May 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.