Code of Conduct
Description
Hello!
I'm excited to see the work for tag support in data sources that was released as part of #196 . Now that it has been released, I have a feature request: would it be possible to include tag information on the outputs of the data sources?
In our use case, we have essentially a "chain" of Packer images that are being built: a 'base' template image gets built, then that template is consumed by other downstream images, and those images are further consumed by other images, etc. It would be very useful to be able to discover the tags on any of the original input images so that they could be propagated forward to the further downstream images. (Essentially, this would allow "inheritance" of tag information on a case-by-case basis.)
Use Case(s)
To allow the usage of tags that were retrieved from a data source when building an image with vsphere-clone (e.g.).
Potential Configuration
Something like the following, based on existing examples in the docs. (Note that this is probably not syntactically correct but I think it gets the point across.)
data "vsphere-content-library-item" "iso" {
vcenter_server = "vc01.example.com"
username = "administrator@vsphere.local"
password = "VMware1!"
datacenter = "dc-01"
content_library = "lib01"
name = "linux-debian-13*-amd64"
type = "iso"
tag {
category = "environment"
name = "production"
}
}
source "vsphere-clone" "example" {
vcenter_server = "vc01.example.com"
username = "administrator@vsphere.local"
password = "VMware1!"
host = "esx01.example.com"
iso_paths = [data.vsphere-content-library-item.iso.path]
dynamic "tag" {
# Not currently possible - feature request here!
for_each = data.vsphere-content-library-item.iso.tags
content {
category = tag.category
name = tag.name
}
}
# Then my image can be further enhanced with my own tags here
tag {
category = "my-category"
name = "my-name"
}
}
build {
sources = ["source.vsphere-clone.example"]
}
References
No response
Code of Conduct
Description
Hello!
I'm excited to see the work for tag support in data sources that was released as part of #196 . Now that it has been released, I have a feature request: would it be possible to include tag information on the outputs of the data sources?
In our use case, we have essentially a "chain" of Packer images that are being built: a 'base' template image gets built, then that template is consumed by other downstream images, and those images are further consumed by other images, etc. It would be very useful to be able to discover the tags on any of the original input images so that they could be propagated forward to the further downstream images. (Essentially, this would allow "inheritance" of tag information on a case-by-case basis.)
Use Case(s)
To allow the usage of tags that were retrieved from a data source when building an image with
vsphere-clone(e.g.).Potential Configuration
Something like the following, based on existing examples in the docs. (Note that this is probably not syntactically correct but I think it gets the point across.)
References
No response