Yohan460 / terraform-provider-jamf

Other
14 stars 10 forks source link

resource_jamf_computer_extension_attribute.go [sometimes] fails with "Root object was present, but now absent." #25

Closed w0de closed 3 months ago

w0de commented 3 months ago

Reproducible in acc tests:

=== NAME  TestAccJamfComputerExtensionAttribute_basic
    resource_jamf_computer_extension_attribute_test.go:12: Step 1/3 error: Error running apply: exit status 1

        Error: Provider produced inconsistent result after apply

        When applying changes to
        jamf_computer_extension_attribute.extensionattribute-script, provider
        "provider[\"registry.terraform.io/hashicorp/jamf\"]" produced an unexpected
        new value: Root object was present, but now absent.

        This is a bug in the provider, which should be reported in the provider's own
        issue tracker.
--- FAIL: TestAccJamfComputerExtensionAttribute_basic (1.51s)

The remote state is properly created. It seems that Jamf API returns a 404, & the object's ID is set to an empty string (60% sure). It's not clear if we're passing an erroneous ID to resourceJamfComputerExtensionAttributeRead or if the Jamf API lags (suspect latter, but need to reproduce outside tests to prove).

w0de commented 3 months ago

Reproducible outside tests with smart groups.

w0de commented 3 months ago

Duplicate of #3.