Closed mkyc closed 2 years ago
Hah, it's even better. I separated nexus setup with helm from nexus resources creation. Provider makes nexus unaccessible somehow.
Steps: 1) create nexus 2) login to nexus 3) create second admin user 4) check that I can login with default and second admin users into nexus 5) run script with just:
resource "nexus_security_realms" "docker_token" {
active = ["DockerToken"]
}
it fails with:
Error: could not read active realms: HTTP: 401, <nil>
│
│ with module.nexus_tools_resources.nexus_security_realms.docker_token,
│ on ../../../terraform/modules/nexus-resources/v01/main.tf line 61, in resource "nexus_security_realms" "docker_token":
│ 61: resource "nexus_security_realms" "docker_token" {
6) check and now I cannot login with none of admin users.
I use provider 1.18.0.
hi @mkyc,
you must set al list of all active security realms. With this following example you deactivate all realms except DockerToken:
resource "nexus_security_realms" "docker_token" {
active = ["DockerToken"]
}
I hope this explains the behavior.
regards André
please use this example.
resource "nexus_security_realms" "active" {
active =. [
"NexusAuthenticatingRealm",
"NexusAuthorizingRealm",
"DockerTocken",
]
}
We will improve the documentation.
@anmoel thanks for this! That was exactly the case! And - yes - documentation note about required realms would be huge help here. Feel free to close this issue if you want.
the documentation will improved in the next release
Describe the bug When running
terraform apply
second time I get error presented later.To Reproduce terraform script (more or less what I have):
On second run I get:
Expected behavior work :)