terraform-provider-terraform icon indicating copy to clipboard operation
terraform-provider-terraform copied to clipboard

defaults values can't be nothing but string

Open Pryz opened this issue 7 years ago • 0 comments

If you have this remote state :

data "terraform_remote_state" "main" {
  backend = "atlas"

  config {
    name = "${var.environment}"
  }

  defaults {
    subnets = []
  }
}

Trying to use this data source with :

output "subnets" {
  value="${data.terraform_remote_state.main.subnets}"
}

Will fail with the following :

defaults (subnets): '' expected type 'string', got unconvertible type '[]interface {}'

Terraform version : v0.11.3 Provider version : v1.0.2

Pryz avatar Feb 15 '18 00:02 Pryz