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

retrieve existing nutanix_resource like aws_ami filter works

Open manelso opened this issue 4 years ago • 2 comments

I'm integrating Terraform over a working Nutanix infraestructure and need to retrieve some existing images to use in my terraform template.

There's a way to do this like aws_ami filter works?

data "aws_ami" "base_image" { filter { name = "name" values = ["packer-ubuntu18-aws-image"] } }

manelso avatar Jun 21 '20 09:06 manelso

Hi @manelso,

The provider has the nutanix_image data source (example below). Is this the functionality you are looking for?

data "nutanix_image" "centos" {
  image_name = "CentOS_7_Cloud"
}

yannickstruyf3 avatar Aug 04 '20 11:08 yannickstruyf3

Hey @manelso - If the nutanix_image data_source satisfies your use-case? Can we close this issue?

tparekh73 avatar Aug 27 '21 18:08 tparekh73