datadrivers / terraform-provider-nexus

Terraform provider for Sonatype Nexus
https://registry.terraform.io/providers/datadrivers/nexus
Mozilla Public License 2.0
119 stars 53 forks source link

Creating truststore certificate resource showing "inconsistent result" error #446

Open fletch3555 opened 5 months ago

fletch3555 commented 5 months ago

Is there an existing issue for this?

Community Note

Terraform Version

1.5.7

Nexus Provider Version

2.2.0

Nexus Version

3.67.1

Affected Resource(s)/Data Source(s)

nexus_security_ssl_truststore

Terraform Configuration Files

resource "nexus_security_ssl_truststore" "mycert" {
  pem = file("${path.module}/mycert.pem") #cert contents are irrelevant, so just use any you have available
}

Debug Output/Panic Output

╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to nexus_security_ssl_truststore.mycert, provider "provider[\"registry.terraform.io/datadrivers/nexus\"]" produced an unexpected new value: Root
│ resource was present, but now absent.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵

Expected Behaviour

Certificate resource should be created without error

Actual Behaviour

Certificate resource is added, but error is displayed

Steps to Reproduce

  1. terraform apply

References

No response

fletch3555 commented 5 months ago

I understand my terraform version is out of date, but it was installed with homebrew and does not show any updates available for me. I'm working on that. In the meantime, I'm not convinced that's particularly relevant, but if you disagree, I can certainly try to get an updated version running and test again with that.

chris-ruecker commented 5 months ago

Hello, i was not able to reproduce the issue. I tried it with the same Terraform version, and the newest version of nexus (3.69.0), with a self signed mycert.pem.

fletch3555 commented 5 months ago

We're in the process of updating to 3.69.0, so I'll test again then. If that still doesn't work, I'll get my terraform version updated as well.