terraform-provider-oci
terraform-provider-oci copied to clipboard
Changes on oci_core_instance_pool are not applied if dynamic block is used fro load_balancers section
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 v1.2.2 on windows_amd64
Your version of Terraform is out of date! The latest version is 1.2.4. You can update by downloading from https://www.terraform.io/downloads.html
Affected Resource(s)
- oci_core_instance_pool
Terraform Configuration Files
This file is maintained automatically by "terraform init".
Manual edits may be lost in future updates.
provider "registry.terraform.io/oracle/oci" { version = "4.81.0" constraints = "4.81.0" hashes = [ "h1:gcqGBIK6a7tNRY3kxPsdFfGGA06aG3uxn4kIntKU5hU=", "zh:2ff8fc33bd80de53afd901bf691d8197a8ed5588255e9af27d0d897d81d2f476", "zh:30dc0dc313ae672424caa316e53e727bd825ee5c7fb5cdfde12c6489452e9c54", "zh:406fa9ffba9e47da7ae6326f6ad84bbde771d5e70a991045bbf0b22e0fc932e0", "zh:423f0d5081ed12a6849e0f9f88e9c7d5a45ccc42fbd203dabc0c9bbc698d4ff8", "zh:5cbc0682b978bb333f17436df978b937e2cccb3bd53712a5bed7acd78b7c1d54", "zh:5d91f8f63be47330554003394ca6cd408bbd2708d93e53d3efdc007f69c9c505", "zh:63070c1c02a15de69670801f132e2f8afc9a287818e7dc0150717592aaaabbd9", "zh:8610f2fef5f13057b1de5837be535d2f977316df6663b7a3e7e326eba12da864", "zh:9b12af85486a96aedd8d7984b0ff811a4b42e3d88dad1a3fb4c0b580d04fa425", "zh:9fa21387f7d76f54c80bb9b36f3a1914385c0bb877dc81eb00086444a7416af7", "zh:a0b40afe1c54c86c54794b1bbadfd3d02c5c4dca6c366b90e12121fa51778aff", "zh:e0b941f2a9eebd9440bb145366094bd4f281be157cb21929a17a484437f54cb0", "zh:ecd8ef5ecb367d4cc4162fc6f75d1b296c2a49e1f20c57109c1f291c67badcc1", "zh:f6ff2ad95a49b34f38fbebf230161324805d5fdaad4b5a1a40ae07458afd9ca9", "zh:fdcb78f1fd383ab197697e53cdd6b2d79cc237749861a3172fdee2f6dde52ec1", ] }
Debug Output
Panic Output
Expected Behavior
The resource is built as follow:
resource "oci_core_instance_pool" "instance_pool" { #Required compartment_id = data.oci_identity_compartments.pool_compartment_id.compartments[0].id instance_configuration_id = data.oci_core_instance_configurations.instance_configuration.instance_configurations[0].id placement_configurations { #Required availability_domain = var.ipool_properties.AD1_placement_configuration.availability_domain primary_subnet_id = data.oci_core_subnets.pool_subnet_ad1.subnets[0].id } placement_configurations { #Required availability_domain = var.ipool_properties.AD2_placement_configuration.availability_domain primary_subnet_id = data.oci_core_subnets.pool_subnet_ad2.subnets[0].id } placement_configurations { #Required availability_domain = var.ipool_properties.AD3_placement_configuration.availability_domain primary_subnet_id = data.oci_core_subnets.pool_subnet_ad3.subnets[0].id } size = var.ipool_properties.instance_pool_size #Optional display_name = var.ipool_properties.display_name freeform_tags = var.ipool_properties.freeform_tags
dynamic "load_balancers" { for_each = var.ipool_properties.load_balancer_attachment.lb_attachment_enable ? var.ipool_properties.load_balancer_attachment.lb_attachments_details : [] iterator = lb_attachment content{ #Required backend_set_name = lb_attachment.value.backend_set_name load_balancer_id = data.oci_load_balancer_load_balancers.app_load_balancers.load_balancers[0].id port = lb_attachment.value.port vnic_selection = lb_attachment.value.vnic_selection } } }
if you update one the following parameters:
- backend lb port
- remove lb from ipool
- lb attachment from ipool
applying terraform apply changes should be applied
Actual Behavior
No changes are executed. The issue happens only with the use of the dynamic block
Steps to Reproduce
- configured the resource as reported above
- apply changes on the content of the dynamic block suing terraform apply
Important Factoids
The issue happens only with the use of the dynamic block