deploymenttheory / terraform-provider-jamfpro

Jamf Pro Terraform Provider/Plugin written with the TF Provider SDK v2. Written in go
Mozilla Public License 2.0
22 stars 8 forks source link

Issue: can't create static computer groups #270

Closed ecanault closed 3 days ago

ecanault commented 1 month ago

I know some works has to be done here regarding the assignments, and like others I can’t create empty static groups.

With this plan:

  # jamfpro_computer_group.object["3A3C3DFC-18E2-4967-9F98-7EE1BC152111"] will be created
  + resource "jamfpro_computer_group" "object" {
      + id       = (known after apply)
      + is_smart = false
      + name     = "stcg_for_admins"

      + site {
          + id = -1
        }
    }

The result is:

jamfpro_computer_group.object["3A3C3DFC-18E2-4967-9F98-7EE1BC152111"]: Creating...
2024-05-31T14:25:22.227+0200 [ERROR] provider.terraform-provider-jamfpro_v0.0.57: Response contains error diagnostic: @caller=github.com/hashicorp/terraform-plugin-go@v0.23.0/tfprotov5/internal/diag/diagnostics.go:58 diagnostic_summary="failed to construct Jamf Pro Computer Group: failed to get computers" tf_proto_version=5.6 tf_req_id=22afe0fd-753e-4b3a-399b-20f0f933f192 @module=sdk.proto diagnostic_severity=ERROR tf_rpc=ApplyResourceChange diagnostic_detail= tf_resource_type=jamfpro_computer_group tf_provider_addr=provider timestamp=2024-05-31T14:25:22.227+0200
2024-05-31T14:25:22.347+0200 [ERROR] vertex "jamfpro_computer_group.object[\"3A3C3DFC-18E2-4967-9F98-7EE1BC152111\"]" error: failed to construct Jamf Pro Computer Group: failed to get computers
ecanault commented 1 month ago

Just tested v0.0.58: small issues regarding concurrent sessions, but putting a value of 2 for max_concurrent_requests in provider options made the job.

Both smart and static groups are correctly created.

Thanks. A. Lot!

ShocOne commented 1 month ago

Thanks for the feedback. We will have other fixes coming next week that resolve the issues with jamfs load balancer, which underneath is the root cause. These will be implemented in the http client and rolled up for release v0.0.59.

ShocOne commented 3 days ago

this has been updated and incorporated into release v0.1.0 with consideration for the discussion points above.