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

Add support for Terraform v0.12 #158

Closed
s-u-b-h-a-k-a-r opened this issue Jun 1, 2019 · 5 comments
Closed

Add support for Terraform v0.12 #158

s-u-b-h-a-k-a-r opened this issue Jun 1, 2019 · 5 comments
Labels
blocked-0.12 enhancement New feature or request

Comments

@s-u-b-h-a-k-a-r
Copy link

s-u-b-h-a-k-a-r commented Jun 1, 2019

Terraform v0.12.0

  • provider.google v2.7.0
  • provider.google-beta v2.7.0
  • provider.kubernetes v1.7.0
  • provider.null v2.1.2
  • provider.random v2.1.2

Initializing modules...

  • gke in ../..

Initializing the backend...

Initializing provider plugins...

  • Checking for available provider plugins...
  • Downloading plugin for provider "google-beta" (terraform-providers/google-beta) 2.7.0...
  • Downloading plugin for provider "null" (terraform-providers/null) 2.1.2...
  • Downloading plugin for provider "random" (terraform-providers/random) 2.1.2...
  • Downloading plugin for provider "kubernetes" (terraform-providers/kubernetes) 1.7.0...
  • Downloading plugin for provider "google" (terraform-providers/google) 2.7.0...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

  • provider.kubernetes: version = "~> 1.7"
  • provider.null: version = "~> 2.1"
  • provider.random: version = "~> 2.1"

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
root@gcloud-gke-ubuntu:/home/vagrant/terraform-google-kubernetes-engine/examples/simple_zonal# clear
root@gcloud-gke-ubuntu:/home/vagrant/terraform-google-kubernetes-engine/examples/simple_zonal# terraform plan
var.ip_range_pods
The secondary ip range to use for pods

Enter a value:

var.ip_range_pods
The secondary ip range to use for pods

Enter a value:

var.ip_range_pods
The secondary ip range to use for pods

Enter a value:

var.ip_range_pods
The secondary ip range to use for pods

Enter a value: 10.8.0.0

var.ip_range_services
The secondary ip range to use for pods

Enter a value: 10.8.0.0

var.network
The VPC network to host the cluster in

Enter a value: default

var.project_id
The project ID to host the cluster in

Enter a value: mystical-being-195215

var.region
The region to host the cluster in

Enter a value: us-central1

var.subnetwork
The subnetwork to host the cluster in

Enter a value: default

var.zones
The zone to host the cluster in (required if is a zonal cluster)

Enter a value: us-central1-a

Error: Variables not allowed

on line 1:
(source code not available)

Variables may not be used here.

root@gcloud-gke-ubuntu:/home/vagrant/terraform-google-kubernetes-engine/examples/simple_zonal# terraform plan
var.ip_range_pods
The secondary ip range to use for pods

Enter a value: 10.8.0.0

var.ip_range_services
The secondary ip range to use for pods

Enter a value: 10.8.0.0

var.network
The VPC network to host the cluster in

Enter a value: default

var.project_id
The project ID to host the cluster in

Enter a value:
var.ip_range_pods

var.project_id
The project ID to host the cluster in

Enter a value:
var.region
The secondary ip range to use for pods
The region to host the cluster in

Enter a value:
var.subnetwork
The subnetwork to host the cluster in

Enter a value:

var.subnetwork
The subnetwork to host the cluster in

Enter a value: mystical-being-195215

var.zones
The zone to host the cluster in (required if is a zonal cluster)

Enter a value: ["us-central1-a", "us-central1-b", "us-central1-f"]

Error: Unsupported argument

on ../../cluster_regional.tf line 39, in resource "google_container_cluster" "primary":
39: 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"?

Error: Incorrect attribute value type

on ../../cluster_regional.tf line 52, in resource "google_container_cluster" "primary":
52: disabled = "${var.http_load_balancing ? 0 : 1}"

Inappropriate value for attribute "disabled": bool required.

Error: Incorrect attribute value type

on ../../cluster_regional.tf line 56, in resource "google_container_cluster" "primary":
56: disabled = "${var.horizontal_pod_autoscaling ? 0 : 1}"

Inappropriate value for attribute "disabled": bool required.

Error: Incorrect attribute value type

on ../../cluster_regional.tf line 60, in resource "google_container_cluster" "primary":
60: disabled = "${var.kubernetes_dashboard ? 0 : 1}"

Inappropriate value for attribute "disabled": bool required.

Error: Incorrect attribute value type

on ../../cluster_regional.tf line 64, in resource "google_container_cluster" "primary":
64: disabled = "${var.network_policy ? 0 : 1}"

Inappropriate value for attribute "disabled": bool required.

Error: Incorrect attribute value type

on ../../cluster_zonal.tf line 30, in resource "google_container_cluster" "zonal_primary":
30: node_locations = ["${slice(var.zones,1,length(var.zones))}"]

Inappropriate value for attribute "node_locations": element 0: string
required.

Error: Unsupported argument

on ../../cluster_zonal.tf line 39, in resource "google_container_cluster" "zonal_primary":
39: 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"?

Error: Incorrect attribute value type

on ../../cluster_zonal.tf line 52, in resource "google_container_cluster" "zonal_primary":
52: disabled = "${var.http_load_balancing ? 0 : 1}"

Inappropriate value for attribute "disabled": bool required.

Error: Incorrect attribute value type

on ../../cluster_zonal.tf line 56, in resource "google_container_cluster" "zonal_primary":
56: disabled = "${var.horizontal_pod_autoscaling ? 0 : 1}"

Inappropriate value for attribute "disabled": bool required.

Error: Incorrect attribute value type

on ../../cluster_zonal.tf line 60, in resource "google_container_cluster" "zonal_primary":
60: disabled = "${var.kubernetes_dashboard ? 0 : 1}"

Inappropriate value for attribute "disabled": bool required.

Error: Incorrect attribute value type

on ../../cluster_zonal.tf line 64, in resource "google_container_cluster" "zonal_primary":
64: disabled = "${var.network_policy ? 0 : 1}"

Inappropriate value for attribute "disabled": bool required.

Error: Missing resource instance key

on ../../sa.tf line 40, in resource "google_project_iam_member" "cluster_service_account-log_writer":
40: project = "${google_service_account.cluster_service_account.project}"

Because google_service_account.cluster_service_account has "count" set, its
attributes must be accessed on specific instances.

For example, to correlate with indices of a referring resource, use:
google_service_account.cluster_service_account[count.index]

Error: Missing resource instance key

on ../../sa.tf line 42, in resource "google_project_iam_member" "cluster_service_account-log_writer":
42: member = "serviceAccount:${google_service_account.cluster_service_account.email}"

Because google_service_account.cluster_service_account has "count" set, its
attributes must be accessed on specific instances.

For example, to correlate with indices of a referring resource, use:
google_service_account.cluster_service_account[count.index]

@s-u-b-h-a-k-a-r s-u-b-h-a-k-a-r changed the title Unsupported argument exception is thrown with the latest terraform version Unsupported argument and Incorrect attribute value type exceptions are thrown with the latest terraform version Jun 1, 2019
@morgante
Copy link
Contributor

morgante commented Jun 1, 2019 via email

@s-u-b-h-a-k-a-r
Copy link
Author

What Terraform version are you using? 0.12 is not yet supported for this module.
On Sat, Jun 1, 2019 at 00:04 SubhakarKotta @.> wrote: Initializing modules... - gke in ../.. Initializing the backend... Initializing provider plugins... - Checking for available provider plugins... - Downloading plugin for provider "google-beta" (terraform-providers/google-beta) 2.7.0... - Downloading plugin for provider "null" (terraform-providers/null) 2.1.2... - Downloading plugin for provider "random" (terraform-providers/random) 2.1.2... - Downloading plugin for provider "kubernetes" (terraform-providers/kubernetes) 1.7.0... - Downloading plugin for provider "google" (terraform-providers/google) 2.7.0... The following providers do not have any version constraints in configuration, so the latest version was installed. To prevent automatic upgrades to new major versions that may contain breaking changes, it is recommended to add version = "..." constraints to the corresponding provider blocks in configuration, with the constraint strings suggested below. - provider.kubernetes: version = "> 1.7" - provider.null: version = "> 2.1" - provider.random: version = "~> 2.1" Terraform has been successfully initialized! You may now begin working with Terraform. Try running "terraform plan" to see any changes that are required for your infrastructure. All Terraform commands should now work. If you ever set or change modules or backend configuration for Terraform, rerun this command to reinitialize your working directory. If you forget, other commands will detect it and remind you to do so if necessary. @.:/home/vagrant/terraform-google-kubernetes-engine/examples/simple_zonal# clear @.:/home/vagrant/terraform-google-kubernetes-engine/examples/simple_zonal# terraform plan var.ip_range_pods The secondary ip range to use for pods Enter a value: var.ip_range_pods The secondary ip range to use for pods Enter a value: var.ip_range_pods The secondary ip range to use for pods Enter a value: var.ip_range_pods The secondary ip range to use for pods Enter a value: 10.8.0.0 var.ip_range_services The secondary ip range to use for pods Enter a value: 10.8.0.0 var.network The VPC network to host the cluster in Enter a value: default var.project_id The project ID to host the cluster in Enter a value: mystical-being-195215 var.region The region to host the cluster in Enter a value: us-central1 var.subnetwork The subnetwork to host the cluster in Enter a value: default var.zones The zone to host the cluster in (required if is a zonal cluster) Enter a value: us-central1-a Error: Variables not allowed on line 1: (source code not available) Variables may not be used here. @.:/home/vagrant/terraform-google-kubernetes-engine/examples/simple_zonal# terraform plan var.ip_range_pods The secondary ip range to use for pods Enter a value: 10.8.0.0 var.ip_range_services The secondary ip range to use for pods Enter a value: 10.8.0.0 var.network The VPC network to host the cluster in Enter a value: default var.project_id The project ID to host the cluster in Enter a value: var.ip_range_pods var.project_id The project ID to host the cluster in Enter a value: var.region The secondary ip range to use for pods The region to host the cluster in Enter a value: var.subnetwork The subnetwork to host the cluster in Enter a value: var.subnetwork The subnetwork to host the cluster in Enter a value: mystical-being-195215 var.zones The zone to host the cluster in (required if is a zonal cluster) Enter a value: ["us-central1-a", "us-central1-b", "us-central1-f"] Error: Unsupported argument on ../../cluster_regional.tf line 39, in resource "google_container_cluster" "primary": 39: 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"? Error: Incorrect attribute value type on ../../cluster_regional.tf line 52, in resource "google_container_cluster" "primary": 52: disabled = "${var.http_load_balancing ? 0 : 1}" Inappropriate value for attribute "disabled": bool required. Error: Incorrect attribute value type on ../../cluster_regional.tf line 56, in resource "google_container_cluster" "primary": 56: disabled = "${var.horizontal_pod_autoscaling ? 0 : 1}" Inappropriate value for attribute "disabled": bool required. Error: Incorrect attribute value type on ../../cluster_regional.tf line 60, in resource "google_container_cluster" "primary": 60: disabled = "${var.kubernetes_dashboard ? 0 : 1}" Inappropriate value for attribute "disabled": bool required. Error: Incorrect attribute value type on ../../cluster_regional.tf line 64, in resource "google_container_cluster" "primary": 64: disabled = "${var.network_policy ? 0 : 1}" Inappropriate value for attribute "disabled": bool required. Error: Incorrect attribute value type on ../../cluster_zonal.tf line 30, in resource "google_container_cluster" "zonal_primary": 30: node_locations = ["${slice(var.zones,1,length(var.zones))}"] Inappropriate value for attribute "node_locations": element 0: string required. Error: Unsupported argument on ../../cluster_zonal.tf line 39, in resource "google_container_cluster" "zonal_primary": 39: 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"? Error: Incorrect attribute value type on ../../cluster_zonal.tf line 52, in resource "google_container_cluster" "zonal_primary": 52: disabled = "${var.http_load_balancing ? 0 : 1}" Inappropriate value for attribute "disabled": bool required. Error: Incorrect attribute value type on ../../cluster_zonal.tf line 56, in resource "google_container_cluster" "zonal_primary": 56: disabled = "${var.horizontal_pod_autoscaling ? 0 : 1}" Inappropriate value for attribute "disabled": bool required. Error: Incorrect attribute value type on ../../cluster_zonal.tf line 60, in resource "google_container_cluster" "zonal_primary": 60: disabled = "${var.kubernetes_dashboard ? 0 : 1}" Inappropriate value for attribute "disabled": bool required. Error: Incorrect attribute value type on ../../cluster_zonal.tf line 64, in resource "google_container_cluster" "zonal_primary": 64: disabled = "${var.network_policy ? 0 : 1}" Inappropriate value for attribute "disabled": bool required. Error: Missing resource instance key on ../../sa.tf line 40, in resource "google_project_iam_member" "cluster_service_account-log_writer": 40: project = "${google_service_account.cluster_service_account.project}" Because google_service_account.cluster_service_account has "count" set, its attributes must be accessed on specific instances. For example, to correlate with indices of a referring resource, use: google_service_account.cluster_service_account[count.index] Error: Missing resource instance key on ../../sa.tf line 42, in resource "google_project_iam_member" "cluster_service_account-log_writer": 42: member = "serviceAccount:${google_service_account.cluster_service_account.email}" Because google_service_account.cluster_service_account has "count" set, its attributes must be accessed on specific instances. For example, to correlate with indices of a referring resource, use: google_service_account.cluster_service_account[count.index] — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#158?email_source=notifications&email_token=AAMNNGIKRH2NGOXNHTQ2BILPYINONA5CNFSM4HR74DC2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GXCRPEQ>, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMNNGMFKMPT7B3DGDJ4BULPYINONANCNFSM4HR74DCQ .
-- Morgante Pell Strategic Cloud Engineer morgantep@google.com +1 212-565-7834

What should be the terraform version ? I am using latest 0.12

@aaron-lane
Copy link
Contributor

@subhakarkotta Terraform 0.11.14 should be compatible with this module.

@aaron-lane aaron-lane changed the title Unsupported argument and Incorrect attribute value type exceptions are thrown with the latest terraform version Add support for Terraform v0.12 Jun 3, 2019
@aaron-lane aaron-lane added the enhancement New feature or request label Jun 3, 2019
@zioproto
Copy link
Contributor

zioproto commented Jun 6, 2019

Is there a plan to upgrade this module to be compatible with Terraform 0.12 ? What would be the expected release date ?
thanks

@morgante
Copy link
Contributor

morgante commented Jun 6, 2019

@zioproto We're expecting within the next 2 weeks.

bohdanyurov-gl pushed a commit to bohdanyurov-gl/terraform-google-kubernetes-engine that referenced this issue Jun 13, 2019
terraform-google-modules#158

Add support for TF 0.12.
- autogen
- root and private_cluster modules
- tests (including support for validation)
- examples
bohdanyurov-gl pushed a commit to bohdanyurov-gl/terraform-google-kubernetes-engine that referenced this issue Jun 13, 2019
terraform-google-modules#158
terraform-google-modules#75

Add support for TF 0.12.
- autogen
- root and private_cluster modules
- tests (including support for validation)
- examples
bohdanyurov-gl pushed a commit to bohdanyurov-gl/terraform-google-kubernetes-engine that referenced this issue Jun 13, 2019
terraform-google-modules#158
terraform-google-modules#75

Add support for TF 0.12.
- autogen
- root and private_cluster modules
- tests (including support for validation)
- examples
bohdanyurov-gl pushed a commit to bohdanyurov-gl/terraform-google-kubernetes-engine that referenced this issue Jun 13, 2019
terraform-google-modules#158
terraform-google-modules#75

Add support for TF 0.12.
- autogen
- root and private_cluster modules
- tests (including support for validation)
- examples
bohdanyurov-gl pushed a commit to bohdanyurov-gl/terraform-google-kubernetes-engine that referenced this issue Jun 13, 2019
terraform-google-modules#158
terraform-google-modules#75

Add support for TF 0.12.
- autogen
- root and private_cluster modules
- tests (including support for validation)
- examples
bohdanyurov-gl pushed a commit to bohdanyurov-gl/terraform-google-kubernetes-engine that referenced this issue Jun 13, 2019
terraform-google-modules#158
terraform-google-modules#75

Add support for TF 0.12.
- autogen
- root and private_cluster modules
- tests (including support for validation)
- examples
bohdanyurov-gl pushed a commit to bohdanyurov-gl/terraform-google-kubernetes-engine that referenced this issue Jun 13, 2019
terraform-google-modules#158
terraform-google-modules#75

Add support for TF 0.12.
- autogen
- root and private_cluster modules
- tests (including support for validation)
- examples
bohdanyurov-gl pushed a commit to bohdanyurov-gl/terraform-google-kubernetes-engine that referenced this issue Jun 18, 2019
terraform-google-modules#158
terraform-google-modules#75

Add support for TF 0.12.
- autogen
- root and private_cluster modules
- tests (including support for validation)
- examples
aaron-lane added a commit that referenced this issue Jun 18, 2019
Fixes #158: Add support for Terraform v0.12
CPL-markus pushed a commit to WALTER-GROUP/terraform-google-kubernetes-engine that referenced this issue Jul 15, 2024
terraform-google-modules#158
terraform-google-modules#75

Add support for TF 0.12.
- autogen
- root and private_cluster modules
- tests (including support for validation)
- examples
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked-0.12 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants