Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE] Terraform provider changes break code from 1.0.28 to 1.0.36 with chassis data lookup #244

Open
briamorr opened this issue Jul 3, 2023 · 0 comments

Comments

@briamorr
Copy link

briamorr commented Jul 3, 2023

Description

Terraform provider changes break code from 1.0.28 to 1.0.36 with chassis data lookup

Terraform-provider-intersight version

1.0.28 (works fine)
1.0.36 (breaks)

Configuration file
data "intersight_asset_device_registration" "thething" {
    device_hostname = ["imm-fi-loan"]
    platform_type = "UCSFIISM"
} 

data "intersight_equipment_chassis" "all_the_chassis" {
  registered_device {
    moid = data.intersight_asset_device_registration.thething.results[0].moid
   } 
} 
Actual output (Attach screenshots if applicable)
data.intersight_organization_organization.organization: Reading...
data.intersight_asset_device_registration.thething: Reading...
data.intersight_organization_organization.organization: Read complete after 0s [id=5ddf9a396972652d31ec6e5d]
data.intersight_asset_device_registration.thething: Read complete after 0s [id=63c9b1046f72612d38bb15f6]
data.intersight_equipment_chassis.all_the_chassis: Reading...
╷
│ Error: your query for EquipmentChassis data source did not return any results. Please change your search criteria and try again
│
│   with data.intersight_equipment_chassis.all_the_chassis,
│   on chassis.tf line 6, in data "intersight_equipment_chassis" "all_the_chassis":
│    6: data "intersight_equipment_chassis" "all_the_chassis" {
│
╵
Related issues/PRs
Suggest a fix

Verbose Log Differences:

Call from 1.0.28:

2023-07-03T14:25:36.349-0400 [INFO]  provider.terraform-provider-intersight_v1.0.28.exe: 2023/07/03 14:25:36 client.go:463:
GET /api/v1/equipment/Chasses?%24filter=%28RegisteredDevice.Moid+eq+%2763c9b1046f72612d38bb15f6%27%29+and+%28RegisteredDevice.Selector+eq+%27%27%29&%24skip=0&%24top=100 HTTP/1.1

(RegisteredDevice.Moid+eq+'63c9b1046f72612d38bb15f6')+and+(RegisteredDevice.Selector+eq+'')

Call from 1.0.36:

2023-07-03T14:24:22.248-0400 [INFO]  provider.terraform-provider-intersight_v1.0.36.exe: 2023/07/03 14:24:22 client.go:472:
GET /api/v1/equipment/Chasses?%24count=true&%24filter=%28RegisteredDevice.Selector+eq+%27%27%29+and+%28RegisteredDevice.ClassId+eq+%27mo.MoRef%27%29+and+%28RegisteredDevice.Moid+eq+%2763c9b1046f72612d38bb15f6%27%29 HTTP/1.1

(RegisteredDevice.Selector+eq+'')+and+(RegisteredDevice.ClassId+eq+'mo.MoRef')+and+(RegisteredDevice.Moid+eq+'63c9b1046f72612d38bb15f6')

The addition of RegisteredDevice.ClassId eq 'mo.MoRef' seems to break the filter and return 0 results, maybe intersight backend issue as filtering in apidocs for RegisteredDevice/Moid returns value but not when filtering RegisteredDevice/ClassId

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant