Open jeliker opened 4 months ago
Terraform v1.5.7 on darwin_amd64 + provider registry.terraform.io/oracle/oci v5.42.0
affected_resources = oci_os_management_hub_software_sources
data "oci_os_management_hub_software_sources" "iad" { #Required compartment_id = local.tenancy_ocid } #Comparing to OSMS vs. OSMH above data "oci_osmanagement_software_sources" "iad" { #Required compartment_id = local.tenancy_ocid }
Per documentation, oci_os_management_hub_software_sources has software_source_collection which apparently is iterable.
oci_os_management_hub_software_sources
software_source_collection
Actually, software_source_collection itself is a list of 1 which contains items which is list of software sources
items
This will cause error though documentation suggests otherwise
[ for s in data.oci_os_management_hub_software_sources.iad.software_source_collection : s.display_name ]
This will work which is apparent after examining underlying API documentation (vs. Terraform provider docs alone)
[ for s in data.oci_os_management_hub_software_sources.iad.software_source_collection[0].items : s.display_name ]
Compare to this which has similar documentation and behaves as expected.
This will work for oci_osmanagement_software_sources
oci_osmanagement_software_sources
[ for s in data.oci_osmanagement_software_sources.iad.software_sources : s.display_name ]
Community Note
Terraform Version and Provider Version
Affected Resource(s)
affected_resources = oci_os_management_hub_software_sources
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
Per documentation,
oci_os_management_hub_software_sources
hassoftware_source_collection
which apparently is iterable.Actually,
software_source_collection
itself is a list of 1 which containsitems
which is list of software sourcesThis will cause error though documentation suggests otherwise
This will work which is apparent after examining underlying API documentation (vs. Terraform provider docs alone)
Compare to this which has similar documentation and behaves as expected.
This will work for
oci_osmanagement_software_sources