- 
                Notifications
    
You must be signed in to change notification settings  - Fork 724
 
Open
Labels
awaiting-affected-resourcesPlease Provide the affected resource name in description. ex. Affected resource - oci_core_instancePlease Provide the affected resource name in description. ex. Affected resource - oci_core_instancebug
Description
Terraform Version and Provider Version
Terraform v1.8+
Provider: registry.terraform.io/oracle/oci latest
Affected Resource(s)
- data.oci_os_management_hub_managed_instance_installed_packages
 - data.oci_os_management_hub_managed_instance_updatable_packages
 
Terraform Configuration Files
variable "managed_instance_id" {}
data "oci_os_management_hub_managed_instance_installed_packages" "test" {
  managed_instance_id = var.managed_instance_id
}
output "classification" {
  value = try(
      data.oci_os_management_hub_managed_instance_installed_packages.test.installed_package_collection[0].items[0].package_classification,
      "null or empty"
    )
  }
Debug Output
N/A - The issue is a data omission in the provider's response, not a runtime error.
Panic Output
N/A - The provider does not panic.
Expected Behavior
The package_classification attribute should be populated with values like "INSTALLED" or "UPDATABLE".
Actual Behavior
The package_classification attribute is null for all packages.
Steps to Reproduce
- Use the above Terraform configuration with a valid managed instance OCID
 - Run terraform apply
 - Observe that the classification output shows "null or empty"
 - Run terraform show and inspect the state - package_classification is null
 
Important Factoids
This is a known issue left by code generation. The root cause:
- The OCI Go SDK's PackageSummary interface uses packageClassification only as a JSON discriminator, not as an accessible struct field
 - The provider's generated code attempted to access obj.PackageClassification which doesn't exist, causing a compilation error
 - The code was commented out with // FIXME to resolve the build error
 - The fix pattern already exists in the available_packages data source, which correctly hardcodes the classification value
 
References
FIXME comments in source code:
- internal/service/os_management_hub/os_management_hub_managed_instance_installed_packages_data_source.go:274
 - internal/service/os_management_hub/os_management_hub_managed_instance_updatable_packages_data_source.go:308
 
Metadata
Metadata
Assignees
Labels
awaiting-affected-resourcesPlease Provide the affected resource name in description. ex. Affected resource - oci_core_instancePlease Provide the affected resource name in description. ex. Affected resource - oci_core_instancebug