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

Crash when label is specified as a boolean #108

Closed
majelbstoat opened this issue Jan 21, 2018 · 0 comments · Fixed by #135
Closed

Crash when label is specified as a boolean #108

majelbstoat opened this issue Jan 21, 2018 · 0 comments · Fixed by #135

Comments

@majelbstoat
Copy link

Terraform Version

Relevant versions:

terraform [Terraform v0.11.2]

  • provider.kubernetes: version = "~> 1.0"

Affected Resource(s)

At a minimum:

  • kubernetes_replication_controller
  • kubernetes_service

But probably others as well, and this may well be a bug in Terraform core.

Terraform Configuration Files

Partial minimal repro, to give you the idea:

resource "kubernetes_replication_controller" "default" {
  metadata {
    name = "${var.service_name}"

    labels {
      env       = "${terraform.workspace}"
      app       = "${var.service_name}"
      terraform = true # <-This line causes the crash.
    }
  }

  # Rest of spec elided
}

Would guess that this can be repro'd by adding any boolean label to any resource.

Panic Output

panic: interface conversion: interface {} is bool, not string

Expected Behavior

I would have expected automatic conversion of boolean to string.

Actual Behavior

Hard crash. I've confirmed that modifying the label to terraform="true" fixes the problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants