citrix / terraform-provider-citrix

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

AWS Manual Power-Managed Catalog - Could Not Find Resource #48

Closed amshaffer closed 6 months ago

amshaffer commented 6 months ago

Trying to create an AWS-hosted power-managed catalog is resulting in an error "Failed to resolve machines, error: could not find resource"

resource "citrix_machine_catalog" "aws-catalog" {
    name                        = "Test-MachineCatalog"
    description                 = "Test-MachineCatalog"
    zone                        = citrix_zone.zone.id
    allocation_type             = "Random"
    session_support             = "MultiSession"
    is_power_managed            = true
    is_remote_pc                = false
    provisioning_type           = "Manual"
    machine_accounts = [
        {
            hypervisor = citrix_aws_hypervisor.aws-hypervisor.id

            machines = [
                {
                    machine_account = "DOMAIN\\VDA-NAME"
                    machine_name = "i-0a22c640f58fc0fdc"
                    availability_zone = "us-west-2a"
                }
            ]
        }
    ]
}
citrix_machine_catalog.aws-catalog: Creating...
╷
│ Error: Error creating Machine Catalog
│
│   with citrix_machine_catalog.aws-catalog,
│   on machine_catalogs.tf line 1, in resource "citrix_machine_catalog" "aws-catalog":
│    1: resource "citrix_machine_catalog" "aws-catalog" {
│
│ Failed to resolve machines, error: could not find resource

I'm using the AWS instance ID for the machine name, and have confirmed that EC2 instance is in the listed availability zone. Does the AWS machine_name need to be formatted differently than just the instance ID?

xushengl commented 6 months ago

Hi @amshaffer

Thank you for reporting this issue. We will work on fixing this issue.

Xusheng "Fred" Liu

amshaffer commented 6 months ago

Tested this out in v0.5.3 and looks to be working as expected. Thanks for the quick fix @xushengl ! When will the publish to the public tf registry happen?

aneeshk-citrix commented 6 months ago

Hi @amshaffer,

The registry has been updated!

Thanks, Aneesh