yugabyte / terraform-gcp-yugabyte

A Terraform module to deploy and run YugabyteDB on GCP.
Apache License 2.0
5 stars 21 forks source link

Error: Unsupported block type #7

Closed UrsKramer closed 4 years ago

UrsKramer commented 4 years ago

I am trying to deploy yugabyte, but terraform plan and terraform apply throw this error:

Error: Unsupported block type

  on .terraform/modules/yugabyte-db-cluster/main.tf line 42, in resource "google_compute_instance" "yugabyte_node":
  42:     metadata { 

Blocks of type "metadata" are not expected here. Did you mean to define
argument "metadata"? If so, use the equals sign to assign it a value.
moos3 commented 4 years ago

I'm seeing the same thing and trying to test drive yugabyte on gcp.

vishal-biyani commented 4 years ago

I can reproduce the same issue on Terraform version v0.12.9 but does not appear in version v0.11.14. This is related to https://github.com/terraform-providers/terraform-provider-oci/issues/781 and has details in docs here: https://www.terraform.io/upgrade-guides/0-12.html#attributes-vs-blocks

I don't know if there is a backward-compatible way to fix this or we will have to support specific versions of Terraform.

vishal-biyani commented 4 years ago

The PR solves this issue - https://github.com/yugabyte/terraform-gcp-yugabyte/pull/5 the only thing we need to decide is if we break past versions of Terraform and if the proposed change is backward compatible.

bhavin192 commented 4 years ago

@UrsKramer @moos3 this is fixed now as #5 has been merged. Closing this issue for now, please let us know if the issue persist.