-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Machine catalog started as a catalog spun up by calling the rest API, it was then imported into terraform state and re-deployed (along with the delivery group), and trying to remove it now results in an error.
The delivery group (which was also re-deployed after the import) was successfully deleted.
Terraform command (import, apply, etc): terraform apply
Resource impacted: citrix_machine_catalog
Versions
Use the terraform -v command to find the Terraform and Citrix Provider versions.
Terraform: 1.10.4
citrix/citrix provider: 1.0.13
Operation system: Linux
Terraform configuration files
resource "citrix_machine_catalog" "default" {
name = local.catalog_name
allocation_type = var.catalog.allocationType
zone = data.citrix_zone.azure_location_zone.id
machine_catalog_folder_path = "${upper(var.environment_type)}\\${upper(var.tenant_short_name)}"
provisioning_type = "MCS"
session_support = "SingleSession"
scopes = ["00000000-0000-0000-0000-000000000000"]
persist_user_changes = var.catalog.persistUserChanges != null ? var.catalog.persistUserChanges : "Discard"
minimum_functional_level = var.catalog.functionalLevel
delete_virtual_machines = true
delete_machine_accounts = "Delete"
provisioning_scheme = {
hypervisor = var.hypervisor_id
hypervisor_resource_pool = var.hypervisor_resource_pool_id
identity_type = "ActiveDirectory"
number_of_total_machines = var.catalog.numberOfMachines
machine_domain_identity = {
domain = var.domain_info.domain
service_account = var.domain_info.domain_admin_username
service_account_password = var.domain_admin_password
domain_ou = var.catalog.ou != null ? var.catalog.ou : local.default_ou
}
network_mapping = [{
network = var.catalog.subnetName
network_device = "0"
}]
azure_machine_config = {
storage_type = "Premium_LRS"
license_type = "Windows_Client"
service_offering = var.catalog.vmSize
vda_resource_group = var.vda_resource_group
master_image_note = var.image_version
use_azure_compute_gallery = {
replica_maximum = 40
replica_ratio = 100
}
azure_master_image = {
resource_group = var.sharedServices.imageGallery.resourceGroup
shared_subscription = var.sharedServices.subscriptionId
gallery_image = {
gallery = var.sharedServices.imageGallery.name
definition = var.image_name
version = var.image_version
}
}
}
machine_account_creation_rules = {
naming_scheme = local.naming_scheme
naming_scheme_type = "Numeric"
}
}
}
resource "citrix_delivery_group" "default" {
name = local.catalog_name
minimum_functional_level = var.catalog.functionalLevel
delivery_group_folder_path = "${upper(var.environment_type)}\\${upper(var.tenant_short_name)}"
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 : lower("${var.tenant_short_name}\\${group}")]
}
lifecycle {
ignore_changes = [
autoscale_settings
]
replace_triggered_by = [
citrix_machine_catalog.default.id
]
}
}Terraform console output
╷
│ Error: Error deleting Machine Catalog DevOps - net99 - Admin - West Europe
│
│ TransactionId: 31d9caa9-83d1-4c1f-93fc-1ecb1058617b
│ JobId: 9ace27be-371d-4399-b540-551cc8675462
│ Error message: Failed to remove all machines and catalogs.
╵Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working