-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[Feature] Redeploy/destroy of Machine Catalog should put machines into maintenance mode automatically #176
Comments
Hello @anderswagner Thanks for reporting this issue, we will work on a fix for this issue. Best Regards, |
@anderswagner Are these machines in the machine catalog a part of some delivery group that is not managed by terraform? |
@aneeshk-citrix For this particular instance it was machine catalog, delivery group etc. provisioned manually through the API. Then both machine catalog and delivery group was imported into terraform and when trying to run terraform plan + apply it wanted to replace the machine catalog due to one of the properties changing, and then it fails. |
@anderswagner A couple of things to discuss here:
Can you also post the config for delivery group? I'm assuming you do not want a resource dependency between delivery group and machine catalog. (With resource dependency, if machine catalog is being deleted, it will delete the delivery group first. This might be a workaround for your issue for now). Ideally, there shouldn't be a replace on a resource right after importing it (unless, of course, you intend to change a nontrivial property that needs resource replacement). Based on your replies, we can plan for the appropriate fixes and I can also suggest some workarounds till we get the fixes out. Thanks again for bringing this to our attention! Aneesh |
This is our configuration for the delivery group: resource "citrix_delivery_group" "default" {
name = var.catalog.publishedName
minimum_functional_level = var.catalog.functionalLevel
delivery_group_folder_path = "omitted"
delivery_type = var.catalog.deliveryType
associated_machine_catalogs = [{
machine_catalog = citrix_machine_catalog.default.id
machine_count = citrix_machine_catalog.default.provisioning_scheme.number_of_total_machines
}]
desktops = [{
enabled = true
published_name = var.catalog.publishedName
enable_session_roaming = true
}]
autoscale_settings = {
autoscale_enabled = true
}
restricted_access_users = {
allow_list = [for group in var.catalog.deliveryCatalogGroups : "omitted" ]
}
# We want to ignore changes to this, as they are managed elsewhere
lifecycle {
ignore_changes = [
autoscale_settings.autoscale_enabled
]
}
} |
Workaround: Skip specifying persist_user_changes in your config. Let us know how that goes. We will address two issues:
|
@aneeshk-citrix |
Describe the feature request
Fill out the following questions and add any additional information.
Summary:
For the
citrix_machine_catalog
, when it is trying to destroy the machine catalog (either for a replacement or simply destroying it), it will fail due to the following errorThe provider should be able to log off the users, power off the machines and put them into maintenance mode automatically for the delete to go through. These options are currently not available for the consumer of this provider to code into their terraform code, or for it to be done automatically in this version, therefore this request.
Link to any docs that cover this feature:
https://docs.citrix.com/en-us/xenapp-and-xendesktop/7-15-ltsr/install-configure/machine-catalogs-manage.html#delete-machines-from-a-machine-catalog
Terraform code for this resource for clarity:
The text was updated successfully, but these errors were encountered: