You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
=== RUN TestAccMsDefenderIntegrationResource
integration_msdefender_resource_test.go:14: Step 1/4 error: Error running apply: exit status 1
Error: Missing Resource State After Create
with mondoo_integration_msdefender.msdefender_integration,
on terraform_plugin_test.tf line 12, in resource "mondoo_integration_msdefender" "msdefender_integration":
12: resource "mondoo_integration_msdefender" "msdefender_integration" {
The Terraform Provider unexpectedly returned no resource state after having
no errors in the resource creation. This is always an issue in the Terraform
Provider and should be reported to the provider developers.
The resource may have been successfully created, but Terraform is not
tracking it. Applying the configuration again with no other action may result
in duplicate resource errors. Import the resource if the resource was
actually created and Terraform should be tracking it.
// trigger integration to gather results quickly after the first setup
// NOTE: we ignore the error since the integration state does not depend on it
_, err = r.client.TriggerAction(ctx, string(integration.Mrn), mondoov1.ActionTypeRunScan)
if err != nil {
resp.Diagnostics.
AddWarning("Client Error",
fmt.Sprintf("Unable to trigger integration, got error: %s", err),
)
return
}
The return here stops the code before data is written to the state. This implementation is found in many other integrations like GitHub and GCP. I think this should be changed. Simply remove the return statement since it is only a warning anyway!
Describe the bug
on latest main the following tests are failing:
To Reproduce
Run tests on latest main, see https://github.com/mondoohq/terraform-provider-mondoo/actions/runs/12348500045/job/34457483333
Expected behavior
Tests pass
The text was updated successfully, but these errors were encountered: