Closed dimi4ik closed 7 months ago
Hi Dima,
The error message says that the expected format is the SAM name which is Domain\Username or Domain\GroupName. In your case, it should be domain\User1 or example\user1.
We have restrcicted_access_users
on the delivery_group level and also under desktops
. Both follow the same format. Please ensure both have the correct values.
I see that the examples are outdated. We are working on updating this.
Hi @aneeshk-citrix When I type like this I get the following error:
restricted_access_users = { # Comment for restricted_access_users block
allow_list = [
"domain\azureuser" # Comment for allow_list
]
block_list = [
"domain\azureuser", # Comment for block_list
]
}
│ Error: Invalid escape sequence │ │ on 07_delivery_group.tf line 68, in resource "citrix_daas_delivery_group" "dg": │ 68: "domain\azureuser" # Comment for allow_list │ │ The symbol "a" is not a valid escape sequence selector.
what's wrong with me?
Hi @dimi4ik ,
I think it needs to be "domain\azureuser". \
is used for escape characters and that's why you need two of them.
Hi @aneeshk-citrix
As you informed me, the following code has been tested:
restricted_access_users = { # Comment for restricted_access_users block
allow_list = [
"domain\\user1" # Comment for allow_list
]
#block_list = [
# "domain\\user1", # Comment for block_list
#]
}
}
When I type like this I get the following error:
rror: Invalid Attribute Value Match
│
│ with citrix_daas_delivery_group.dg,
│ on 07_delivery_group.tf line 6, in resource "citrix_daas_delivery_group" "dg":
│ 6: resource "citrix_daas_delivery_group" "dg" {
│
│ Attribute desktops[0].restricted_access_users.allow_list[0] must be in Domain\UserOrGroupName format, got: domain\user1
Could you please check if there is an error on my end or if it's a bug from the Terraform provider? If you need any further information or logs, I can provide them.
what's wrong with me?
Hi @dimi4ik ,
Can you post your terraform configuration for delivery groups (.tf
) file and I can take a look.
Thanks, Aneesh
Hi @aneeshk-citrix
here is my delivery groups configuration. And just for you to know, I can successfully create the DG without restricted_access_users & restricted_access_users. Thanks for checking
#
#################################################################
#create a delivery group
#################################################################
resource "citrix_daas_delivery_group" "dg" {
#name = var.delivery_group_name # Comment for name property
name = local.combined_10
description = local.delivery_group_description # Comment for description property
associated_machine_catalogs = [
{
machine_catalog = citrix_daas_machine_catalog.mc.id # Comment for machine_catalog property
machine_count = var.machine_count_dg # Comment for machine_count property
}
]
desktops = [
{
published_name = var.published_name_desktop # Comment for published_name
description = "Desription for example desktop" # Comment for description
enabled = true # Comment for enabled property
enable_session_roaming = false # Comment for enable_session_roaming property
restricted_access_users = { # Comment for restricted_access_users block
allow_list = [
"domain\\user1" # Comment for allow_list
]
#block_list = [
# "domain\\user1", # Comment for block_list
#]
}
}
]
#Comment for autoscale_settings property
autoscale_settings = {
autoscale_enabled = true # Comment for autoscale_enabled property
power_time_schemes = [
{
days_of_week = [
"Monday", # Comment for Monday value
"Tuesday", # Comment for Tuesday value
"Wednesday", # Comment for Wednesday value
"Thursday", # Comment for Thursday value
"Friday" # Comment for Friday value
]
name = "weekdays test" # Comment for name property
display_name = "weekdays schedule" # Comment for display_name property
peak_time_ranges = [
"09:00-17:00" # Comment for peak_time_ranges value
]
pool_size_schedules = [
{
time_range = "00:00-00:00", # Comment for time_range property
pool_size = 1 # Comment for pool_size property
}
]
pool_using_percentage = false # Comment for pool_using_percentage property
},
]
}
restricted_access_users = { # Comment for restricted_access_users block
allow_list = [
"domain\\user1" # Comment for allow_list
]
block_list = [
"domain\\user1", # Comment for block_list
]
}
reboot_schedules = [
{
name = "example_reboot_schedule_weekly"
reboot_schedule_enabled = true
frequency = "Weekly"
frequency_factor = 1
days_in_week = [
"Monday",
"Tuesday",
"Wednesday"
]
start_time = "12:12"
start_date = "2024-05-25"
reboot_duration_minutes = 0
ignore_maintenance_mode = true
natural_reboot_schedule = false
},
{
name = "example_reboot_schedule_monthly"
description = "example reboot schedule"
reboot_schedule_enabled = true
frequency = "Monthly"
frequency_factor = 2
week_in_month = "First"
day_in_month = "Monday"
start_time = "12:12"
start_date = "2024-04-21"
ignore_maintenance_mode = true
reboot_duration_minutes = 120
natural_reboot_schedule = false
reboot_notification_to_users = {
notification_duration_minutes = 15
notification_message = "test message"
notification_title = "test title"
notification_repeat_every_5_minutes = true
}
}
]
}
Hi @dimi4ik ,
Your config looks good. I even ran terraform against your config and it has been working fine for me. If you have more delivery group configurations, can you make sure all of them are correct. In the meantime, I'll try to run some tests to see if I run into this issue.
Thanks
@aneeshk-citrix Thank you for testing. I have now deleted the second DG, which is not controlled via TF, and applied Terraform again, but I still receive the same message. I can wait, but I ask you to consider this problem as a BUG. Thank you.
@aneeshk-citrix @jamesrknox @louiseunice @ejchen Hello everyone, I tested with the new provider version and got the same error message. Could you classify the problem as a BUG and fix it in the new release?
Thanks
Hi @dimi4ik ,
I have just copied the full delivery group config to my own terraform and ran terraform plan. It worked on my end. I also changed the user account to unsupported format that might be used and we were able to catch those errors. @aneeshk-citrix tried and got the same result. It doesn't seem like a bug on the provider.
Please make sure that you don't use domain FQDN in your user list as prefix like domain.com\user
, but only use the valid domain name prefix like domain\user
. We do not allow having .
in domain prefix.
If the issue still persist, please kindly provide one actual value that you use in the user list. You can mask out the actual domain name with placeholder strings but the format has to stay the same.
Thanks @zhuolun-citrix 👍
I found the errors 💯 , my domain name is k000 and that's a problem. If I enter any other domain name instead of my domain, e.g. kkkk then it works, I get another error message. Can I convert the domain name to other variable type? or can you check it? fix
Thanks for the fix, it works now
Hello
Terraform Core Version
he semantic version of Terraform Core used when experiencing the bug. If multiple versions have been tested, a comma separated list.
Terraform v1.5.6 on linux_amd64
provider registry.terraform.io/citrix/citrix v0.4.0 provider registry.terraform.io/hashicorp/azurerm v3.87.0 provider registry.terraform.io/hashicorp/random v3.6.0
Description
When I try to add users to the delivery group, I receive the following message when running Terraform plan or Terraform apply
Error: Invalid Attribute Value Match │ │ with citrix_daas_delivery_group.dg, │ on 07_delivery_group.tf line 6, in resource "citrix_daas_delivery_group" "dg": │ 6: resource "citrix_daas_delivery_group" "dg" { │ │ Attribute desktops[0].restricted_access_users.allow_list[0] must be in Domain\UserOrGroupName format, got: user1@domain.com
The same error message occurs when I write the user or group in the format "user1@example.com" or in the format "user1\example."
Affected Resource(s)
Please list the affected resource(s) and/or data source(s). citrix_daas_delivery_group
Expected Behavior
What should have happened? a new DG mit User should be created.
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Debug Output
Thanks Dima