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

Issue: possible bug in jamfpro_computer_prestage_enrollment ? #462

Open
ecanault opened this issue Nov 18, 2024 · 2 comments
Open

Issue: possible bug in jamfpro_computer_prestage_enrollment ? #462

ecanault opened this issue Nov 18, 2024 · 2 comments

Comments

@ecanault
Copy link

Hi,

If I create from scratch a jamfpro_computer_prestage_enrollment resource containing an Enrollment Packages configuration I encounter this error:

│ Error: failed to create Jamf Pro Computer Prestage Enrollment 'PreStage COMPANY' after retries: failed to create computer prestage, error: {"status_code":400,"method":"POST","url":"https://devnetopie.jamfcloud.com/api/v3/computer-prestages","message":"API Error Response","raw_response":""}
│ 
│   with module.prestages["9D0BDA59-6BCB-443F-8F07-60B61E56B008"].jamfpro_computer_prestage_enrollment.object,
│   on terraform_modules/prestages/resource_jamfpro_prestages.tf line 1, in resource "jamfpro_computer_prestage_enrollment" "object":
│    1: resource "jamfpro_computer_prestage_enrollment" "object" {

For information, there is no error before the plan is applied:

  # module.prestages["9D0BDA59-6BCB-443F-8F07-60B61E56B008"].jamfpro_computer_prestage_enrollment.object will be created
  + resource "jamfpro_computer_prestage_enrollment" "object" {
      + anchor_certificates                     = []
      + auto_advance_setup                      = false
      + custom_package_distribution_point_id    = "-2"
      + custom_package_ids                      = [
          + "146",
        ]
      + default_prestage                        = true
      ...

But if I create the PreStage without the Enrollment Packages configuration: it works.

More strangely, if I add after the Enrollment Package configuration: then it works also.

  # module.prestages["9D0BDA59-6BCB-443F-8F07-60B61E56B008"].jamfpro_computer_prestage_enrollment.object will be updated in-place
  ~ resource "jamfpro_computer_prestage_enrollment" "object" {
      ~ custom_package_distribution_point_id    = "-1" -> "-2"
      ~ custom_package_ids                      = [
          + "146",
        ]
        id                                      = "14"
        # (26 unchanged attributes hidden)

        # (4 unchanged blocks hidden)
    }

Thanks,
Emmanuel

@ShocOne
Copy link
Contributor

ShocOne commented Nov 22, 2024

hi there,

I can replicate the issue.

when i tf with

  custom_package_ids                      = ["1", "2"]
  custom_package_distribution_point_id    = "-1"

i can successful create and i get this

image

however this fails with the cloud dp set on create

  custom_package_ids                      = ["1", "2"]
  custom_package_distribution_point_id    = "-2"

this is definitely an api issue on jamf's side, rather than with the provider.

@ecanault
Copy link
Author

Bad news... 😬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants