Skip to content

volumes: panic when using volumes data source #322

@gokulasanthiya29

Description

@gokulasanthiya29

CSI plugin for nomad crashed for all terraform versions, while trying to implement a pluggable volumes layer with portworx as the storage provider.

Portworx Version = 2.13.2

Reference Code

terraform {
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "~> 4.50"
    }
    nomad = {
      source  = "hashicorp/nomad"
      version = "~> 1"
    }
    template = {
      source  = "hashicorp/template"
      version = "~> 2"
    }
    tls = {
      source  = "hashicorp/tls"
      version = "~> 4"
    }
  }
  required_version = ">= 1.0"
}

provider "nomad" {
  address   = "https://nomad.dev.net:4646"
  secret_id = "secret-id"
  region    = "aws-us-east-1"
}

data "nomad_volumes" "example" {
  type      = "csi"
  plugin_id = "portworx"
}

output "inspected_volumes" {
  value = data.nomad_volumes.example.volumes
}

Terraform's Panic Log

The plugin on proper response should list the available CSI volumes. But on the contrary, the plugin did not respond.

This issue was encountered while generating terraform plan.
terraform plan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions