Skip to content
This repository has been archived by the owner on Mar 29, 2023. It is now read-only.

Incorrect attribute value type errors #45

Closed
MikeyUchiha opened this issue Jun 5, 2019 · 12 comments
Closed

Incorrect attribute value type errors #45

MikeyUchiha opened this issue Jun 5, 2019 · 12 comments

Comments

@MikeyUchiha
Copy link

https://github.com/gruntwork-io/terraform-google-gke/tree/master/examples/gke-private-tiller

After running terraform plan I get the following errors:

var.location
  The location (region or zone) of the GKE cluster.

  Enter a value: us-east4

var.project
  The project ID where all resources will be launched.

  Enter a value: be-my-player-two

var.region
  The region for the network. If the cluster is regional, this must be the same region. Otherwise, it should be the region of the zone.

  Enter a value: us-east4


Error: Incorrect attribute value type

  on modules\gke-cluster\main.tf line 51, in resource "google_container_cluster" "cluster":
  51:       disabled = "${var.http_load_balancing ? 0 : 1}"

Inappropriate value for attribute "disabled": bool required.


Error: Incorrect attribute value type

  on modules\gke-cluster\main.tf line 55, in resource "google_container_cluster" "cluster":
  55:       disabled = "${var.horizontal_pod_autoscaling ? 0 : 1}"

Inappropriate value for attribute "disabled": bool required.


Error: Incorrect attribute value type

  on modules\gke-cluster\main.tf line 59, in resource "google_container_cluster" "cluster":
  59:       disabled = "${var.enable_kubernetes_dashboard ? 0 : 1}"

Inappropriate value for attribute "disabled": bool required.


Error: Incorrect attribute value type

  on modules\gke-cluster\main.tf line 63, in resource "google_container_cluster" "cluster":
  63:       disabled = "${var.enable_network_policy ? 0 : 1}"

Inappropriate value for attribute "disabled": bool required.


Error: Unsupported argument

  on modules\gke-cluster\main.tf line 83, in resource "google_container_cluster" "cluster":
  83:   master_authorized_networks_config = "${var.master_authorized_networks_config}"

An argument named "master_authorized_networks_config" is not expected here.
Did you mean to define a block of type "master_authorized_networks_config"?
@MikeyUchiha
Copy link
Author

hashicorp/terraform#6254 (comment)

I found this link from Terraform. Maybe this has something to do with the "bool required" issue?

@MikeyUchiha
Copy link
Author

Also found this in the documentation that bool values only take true or false and not integers like 0 or 1.
https://www.terraform.io/docs/configuration/expressions.html#types-and-values

@yorinasub17
Copy link
Contributor

Hi @MikeyUchiha , can you share which version of terraform you are using? Just so you are aware, we haven't updated this module to support tf 0.12+ yet, so if you are on that, that would explain the issue.

@MikeyUchiha
Copy link
Author

Hi @yorinasub17 that is correct. I'm using tf 0.12 and what is the release timeline on support for it?
Thanks!

@MikeyUchiha
Copy link
Author

Also, shouldn't the terraform required version reflect this?

terraform {
  required_version = ">= 0.10.3"
}

@MikeyUchiha
Copy link
Author

@yorinasub17 I just wanted to follow up with my question. Do I need to update the required_version field?

@yorinasub17
Copy link
Contributor

Hi @MikeyUchiha,

Sorry for the delay in getting back to you. We are in the process of upgrading all our modules to support tf12 (e.g we have PRs open for the other ones: terraform-google-network, terraform-google-load-balancer, terraform-google-static-assets). We don't have a clear timeline on the process, but we will likely get to this module before the end of the month. I don't think it is necessary to update the required_version field, since updating it won't help with the already released versions.

@MikeyUchiha
Copy link
Author

@yorinasub17 Thank you very much for the thorough explanation. I will close out this issue and look forward to the update.

@yorinasub17
Copy link
Contributor

Actually, let's keep this issue open until the update is merged.

@yorinasub17 yorinasub17 reopened this Jun 8, 2019
@MikeyUchiha
Copy link
Author

Ok. Thank you

@robmorgan
Copy link
Contributor

@tjanson
Copy link

tjanson commented Aug 9, 2019

This is still broken in the google-blog-post-oics branch which is used in the Google Cloud blog post, i.e., you can’t follow the tutorial.

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

No branches or pull requests

4 participants