citrix / terraform-provider-citrix

Terraform Provider for Citrix
https://registry.terraform.io/providers/citrix/citrix/latest
Apache License 2.0
46 stars 6 forks source link

[Feature] Output machine_catalog machine names #122

Closed TimBennett13 closed 1 month ago

TimBennett13 commented 1 month ago

Describe the feature request

Output machine_catalog machine names Summary: I am using FAS and the DaaS machines have to be added to an AD group that is defined in the FAS rules. It would be very useful if the machine names were output so they can be used in the terraform code to add them to an AD group. This can be calculated but there may be an instance where the Citrix provider see a name in use and starts the naming scheme from a different number that ***1

Is this an enhancement to an existing resource or data source, if so which one? existing resource: citrix_machine_catalog

If this is a new resource or data source describe what it should do. existing resource

zhuolun-citrix commented 1 month ago

@TimBennett13 ,

Can you try to use citrix_vda data source as follow:

data "citrix_vda" "vda_by_machine_catalog" {
    machine_catalog = citrix_machine_catalog.{your machine catalog resource}.name
}

Then you can find the list of machine names with:

citrix_vda.vda_by_machine_catalog.vdas

Please let me know if that solves your issue.

Thank you, Zhuolun

TimBennett13 commented 1 month ago

Hello, I am currently having an issue where the Machine Catalog provisioning throws an error and terminates the script, so the data block you suggest isn't executed. It's a known issue that is being worked on by your team. I tried multiple methods to ignore the error but none worked. As soon as the other bug is fixed I can retest this.

Thanks, Tim

TimBennett13 commented 1 month ago

I was able to use the code you suggested on an existing machine catalog and it looks like I can get the machine names from this output. Thank you for your help.

Tim