Closed rismoney closed 3 years ago
Hi @rismoney
This is supposed to be this way. You shall not be able to access them through indexing like before (as earlier they were of type TypeList) because controllers
and logical_drives
attributes have been changed to type TypeSet. These changes were done to achieve a better use-case along with idempotency, and, therefore, as the error suggests, you might need to do some changes to your local configurations.
Error Block type "controller" is represented by a set of objects, and set elements do not have addressable keys. To find elements matching specific criteria, use a "for" expression with an "if" clause.
I believe this means that for you to access them would be to iterate and add conditionals for fetching the required one.
hi @rismoney I'll proceed with closing this issue for now as we have not received any response from you yet. Let me know if you have any further questions, we would be glad to assist you. Thank you.
code
I was able to work around it for now by excluding just local_storage. This worked on previous versions of the provider.
Why am I doing this? I imported 100+ profiles, their local storage RAID's, and those disks come in as "Logical Disk 1" and settings may be slightly different. In new profile creation I my module they are named "OS". So I have a descrepancy. I can, and may, change the name in the call to the module. So this is a very minor issue for me.
However, this is more of a heads up, that the elements don't behave the way they did previously. Not sure if this is a bug or supposed to be this way now. Just figured I'd mention it.