OpenNebula / terraform-provider-opennebula

Terraform provider for OpenNebula
https://www.terraform.io/docs/providers/opennebula/
Mozilla Public License 2.0
63 stars 52 forks source link

`opennebula_service` should support role scale operation #553

Open sk4zuzu opened 4 months ago

sk4zuzu commented 4 months ago

Description

OneFlow service instances support role scaling, but currently Provider does not, changing role cardinality forces resource recreation. There seems to be no code in the Provider that would use necessary API calls. We'd like to change that, as this is a crucial feature of OneFlow. :)

New or affected resources and data sources

Potential terraform configuration

resource "opennebula_service" "service" {
  name = "service"

  template_id = opennebula_service_template.service.id

  extra_template = jsonencode({
      networks_values = [
        { service = { id = tostring(data.opennebula_virtual_network.service.id) } },
        { private = { id = tostring(opennebula_virtual_network.reservation.id) } },
      ]
      roles = [
        { cardinality = 2 },
        { cardinality = 2 },
      ]
  })

  timeouts {
    create = "15m"
    delete = "5m"
  }
}

References

https://docs.opennebula.io/6.8/integration_and_development/system_interfaces/appflow_api.html#service https://github.com/OpenNebula/terraform-provider-opennebula/blob/v1.4.0/opennebula/resource_opennebula_service.go#L55

github-actions[bot] commented 3 months ago

This issue is stale because it has been open for 30 days with no activity and it has not the 'status: confirmed' label or it is not in a milestone. Remove the 'status: stale' label or comment, or this will be closed in 5 days.

github-actions[bot] commented 5 days ago

This issue is stale because it has been open for 30 days with no activity and it has not the 'status: confirmed' label or it is not in a milestone. Remove the 'status: stale' label or comment, or this will be closed in 5 days.