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

nutanix_images_v2 #738

Open
levtech1 opened this issue Jan 29, 2025 · 1 comment
Open

nutanix_images_v2 #738

levtech1 opened this issue Jan 29, 2025 · 1 comment
Assignees

Comments

@levtech1
Copy link

Nutanix Cluster Information

Please provide the version of:

  • Nutanix Cluster (Prism Element / AOS) - AOS 6.10
  • Nutanix Prism Central - PC 2024.3

Terraform Version

Terraform Version is 1.10.5

Affected Resource(s)

  • nutanix_image_v2

Terraform Configuration Files

resource "nutanix_images_v2" "img-1"{
    name = "test-image"
    description = "img desc"
    type = "ISO_IMAGE"
    source{
        url = "http://archive.ubuntu.com/ubuntu/dists/bionic/main/installer-amd64/current/images/netboot/mini.iso"
    }
}

data "nutanix_clusters" "clusters"{}

locals {
cluster0 = data.nutanix_clusters.clusters.entities[0].metadata.uuid
}

resource "nutanix_images_v2" "img-2"{
    name = "test-image"
    description = "img desc"
    type = "DISK_IMAGE"
    source{
        url = "http://archive.ubuntu.com/ubuntu/dists/bionic/main/installer-amd64/current/images/netboot/mini.iso"
    }
    cluster_location_ext_ids = [
        local.cluster0
    ]
}

Debug Output

Panic Output

Expected Behavior

expected behavior should be an out put of the plan

Actual Behavior

error stating below

Image

Steps to Reproduce

  1. terraform plan

Important Factors

  • #0000 <!---Github Issue number --->
@Haroon-Dweikat-Ntx
Copy link
Collaborator

Haroon-Dweikat-Ntx commented Feb 19, 2025

Hi @levtech1

It appears there's a typo in the documentation example. Below is the corrected version:

resource "nutanix_images_v2" "img-1" {
  name        = "test-image"
  description = "img desc"
  type        = "ISO_IMAGE"
  source {
    url_source {
      url = "http://archive.ubuntu.com/ubuntu/dists/bionic/main/installer-amd64/current/images/netboot/mini.iso"
    }
  }
}

data "nutanix_clusters_v2" "clusters" {}

locals {
  clusterExtID = data.nutanix_clusters_v2.clusters.cluster_entities[0].ext_id
}

resource "nutanix_images_v2" "img-2" {
  name        = "test-image"
  description = "img desc"
  type        = "DISK_IMAGE"
  source {
    url_source {
      url = "http://archive.ubuntu.com/ubuntu/dists/bionic/main/installer-amd64/current/images/netboot/mini.iso"
    }
  }
  cluster_location_ext_ids = [
    local.clusterExtID
  ]
}

Here is the PR for the fix :
#752

Thanks!

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

No branches or pull requests

3 participants