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

OSMH Group Software Sources update-in-place (oci_os_management_hub_managed_instance_group) #2259

Open
Sneedes opened this issue Dec 27, 2024 · 1 comment
Labels
bug In-Progress Terraform Team is working on the reproduce & fix

Comments

@Sneedes
Copy link

Sneedes commented Dec 27, 2024

The oci_os_management_hub_managed_instance_group does not behave as expected.
I cannot update an OS Management Hub Group manifest from Terraform.

From the OCI GUI...if I were to attempt to detach the lone/single software source:
Invalid software source(s). Removing all software sources from a group is disallowed.

From the OCI GUI...I can perform the desired update by Attaching the new software source and then detaching the old software source.

When I attempt to update/modify the group manifest / software sources via Terraform...a change is detected...and made...but no change is actually performed in OCI. The same change on every subsequent terraform apply.

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version and Provider Version

$ terraform -v
Terraform v1.10.3
on linux_amd64
+ provider registry.terraform.io/oracle/oci v6.21.0

Affected Resource(s)

oci_os_management_hub_managed_instance_group

Terraform Configuration Files

Original resource creation (successful):

resource "oci_os_management_hub_managed_instance_group" "general_test_ol9_x86_64" {
  arch_type           = "X86_64"
  compartment_id      = oci_identity_compartment.osmh.id
  display_name        = "general_test_ol9_x86_64"
  os_family           = "ORACLE_LINUX_9"
  vendor_name         = "ORACLE"
  software_source_ids = [oci_os_management_hub_software_source.ol9_x86_64["20241204"].id]
  description         = "Oracle Linux 9 for general purpose dev/test/uat"
}

Attempting to update/modify the resource by providing a different list of software_source_ids...

resource "oci_os_management_hub_managed_instance_group" "general_test_ol9_x86_64" {
  arch_type           = "X86_64"
  compartment_id      = oci_identity_compartment.osmh.id
  display_name        = "general_test_ol9_x86_64"
  os_family           = "ORACLE_LINUX_9"
  vendor_name         = "ORACLE"
  software_source_ids = [oci_os_management_hub_software_source.ol9_x86_64["20241227"].id]
  description         = "Oracle Linux 9 for general purpose dev/test/uat"
}

Debug Output

Note the output from terraform apply...change is detected...and claimed to be made...but the same result occurs on every subsequent terraform apply.

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # oci_os_management_hub_managed_instance_group.general_test_ol9_x86_64 will be updated in-place
  ~ resource "oci_os_management_hub_managed_instance_group" "general_test_ol9_x86_64" {
        id                             = "ocid1.osmhmanagedinstancegroup.oc2.us-langley-1.amaaaaaai4ynlmyagqtwnjy7o4ti4sh44dxvtaddruwy2cjikse2me3vbyra"
      ~ software_source_ids            = [
          ~ "ocid1.osmhsoftwaresource.oc2.us-langley-1.amaaaaaai4ynlmya4yjcluvfqhvznrgyfzxjiou7rbi4tove2w5j67kiu5na" -> "ocid1.osmhsoftwaresource.oc2.us-langley-1.amaaaaaai4ynlmya4hpv7cpwdxde5sa2yzfny4jwlefelo3jwhzexu55wj6a",
        ]
        # (18 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

oci_os_management_hub_managed_instance_group.general_test_ol9_x86_64: Modifying... [id=ocid1.osmhmanagedinstancegroup.oc2.us-langley-1.amaaaaaai4ynlmyagqtwnjy7o4ti4sh44dxvtaddruwy2cjikse2me3vbyra]
oci_os_management_hub_managed_instance_group.general_test_ol9_x86_64: Modifications complete after 0s [id=ocid1.osmhmanagedinstancegroup.oc2.us-langley-1.amaaaaaai4ynlmyagqtwnjy7o4ti4sh44dxvtaddruwy2cjikse2me3vbyra]

Apply complete! Resources: 0 added, 1 changed, 0 destroyed.

Panic Output

Expected Behavior

Expected for the terraform apply to perform the needful...detach and attach software sources in desired order to actually replace the software sources associated with the group in OS Management Hub.

Actual Behavior

When I attempt to update/modify the group manifest / software sources via Terraform...a change is detected...and made...but no change is actually performed in OCI. The same change on every subsequent terraform apply.

No changes performed in OCI. The terraform apply claims that 1 resource was modified, but the resource was not actually modified.

Steps to Reproduce

  1. terraform apply

Important Factoids

OCI GovCloud
US Gov East (Ashburn) region

References

@Sneedes Sneedes added the bug label Dec 27, 2024
@tf-oci-pub tf-oci-pub added the In-Progress Terraform Team is working on the reproduce & fix label Dec 27, 2024
@tf-oci-pub
Copy link
Member

Thank you for reporting the issue. We have raised an internal ticket to track this. Our service engineers will get back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug In-Progress Terraform Team is working on the reproduce & fix
Projects
None yet
Development

No branches or pull requests

2 participants