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

Documentation issue — An argument named "disk" is not expected here. Did you mean to define a block of type "disk"? #1032

Open
1 of 5 tasks
alexs77 opened this issue Sep 25, 2023 · 0 comments

Comments

@alexs77
Copy link

alexs77 commented Sep 25, 2023

System Information

Linux distribution

Red Hat Enterprise Linux release 8.8 (Ootpa)

Terraform version

$ terraform -v
Terraform v1.5.7
on linux_amd64
+ provider registry.terraform.io/dmacvicar/libvirt v0.7.1

Provider and libvirt versions

$ .terraform/providers/registry.terraform.io/dmacvicar/libvirt/0.7.1/linux_amd64/terraform-provider-libvirt_v0.7.1 -version
.terraform/providers/registry.terraform.io/dmacvicar/libvirt/0.7.1/linux_amd64/terraform-provider-libvirt_v0.7.1 0.7.1

Checklist

  • Is your issue/contribution related with enabling some setting/option exposed by libvirt that the plugin does not yet support, or requires changing/extending the provider terraform schema?

    • Make sure you explain why this option is important to you, why it should be important to everyone. Describe your use-case with detail and provide examples where possible.
    • If it is a very special case, consider using the XSLT support in the provider to tweak the definition instead of opening an issue
    • Maintainers do not have expertise in every libvirt setting, so please, describe the feature and how it is used. Link to the appropriate documentation
  • Is it a bug or something that does not work as expected? Please make sure you fill the version information below:

Description of Issue/Question

Setup

terraform {
  required_providers {
    libvirt = {
      source  = "dmacvicar/libvirt"
      version = "0.7.1"
    }
  }
}

provider "libvirt" {
  uri = "qemu:///system"
}

resource "libvirt_domain" "default" {
  name        = "example"

  disk = [
    {
      volume_id = libvirt_volume.volume1.id
    },
      {
      volume_id = libvirt_volume.volume2.id
    }
  ]
}

Steps to Reproduce Issue

Per the libvirt_domain documentation, the disk = […] should be correct. However, terraform plan throws an error:

$ terraform plan
╷
│ Error: Unsupported argument
│
│   on main.tf line 17, in resource "libvirt_domain" "default":
│   17:     disk = [
│
│ An argument named "disk" is not expected here. Did you mean to define a block of type "disk"?

I'm referring to this part of the documentation.

Handling disks

The same issue might also be true for eg. cmdline. Have not checked this.


Additional information:

n/a

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

No branches or pull requests

1 participant