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

Repository doesn't notice changes to routing rules #397

Closed
1 task done
adam-carruthers opened this issue Oct 26, 2023 · 3 comments · Fixed by #451
Closed
1 task done

Repository doesn't notice changes to routing rules #397

adam-carruthers opened this issue Oct 26, 2023 · 3 comments · Fixed by #451
Labels
bug Something isn't working

Comments

@adam-carruthers
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

1.6.1

Nexus Provider Version

1.22.0

Nexus Version

3.59.0-01

Affected Resource(s)/Data Source(s)

nexus_repository_r_proxy

Terraform Configuration Files

resource "nexus_repository_r_proxy" "cran_mirror" {
  name         = "cran-mirror"
  online       = true
  routing_rule = "allow_cran"  # after deploying this, change it manually on the Nexus server, the provider won't notice.

  storage {
    blob_store_name                = "default_s3"
    strict_content_type_validation = true
  }

  proxy {
    remote_url = "http://example.com"

    content_max_age  = 5
    metadata_max_age = 5
  }

  negative_cache {
    enabled = false
  }

  http_client {
    blocked    = false
    auto_block = true
  }
}

Debug Output/Panic Output

No debug logs.

If you change the routing rule manually on nexus after deploying the repo, the provider doesn't notice that the routing rule hasn't changed.

Expected Behaviour

It should have noticed the routing rule was changed manually, and added to the plan to change it back.

Actual Behaviour

The plan showed no changes.

Steps to Reproduce

  1. terraform apply to create the repo
  2. manually login to Nexus and change the routing rules for the repository to None
  3. terraform plan

References

No response

@adam-carruthers adam-carruthers added the bug Something isn't working label Oct 26, 2023
@Edu-DevOps
Copy link

Edu-DevOps commented Mar 11, 2024

I have been able to reproduce this using following versions:

  • Nexus 3.61
  • Provider v2.2.0
  • Terraform 1.7.4

I could reproduce the issue with a maven proxy repo also so all proxy repos are potentially affected

@Edu-DevOps
Copy link

Investigating a bit deeper, this issue only happens when the routing rule is manually unassigned to the repo. In the case that another routing rule has been assigned, terraform detect the change and wants to align the repo:

Terraform will perform the following actions:

  # nexus_repository_r_proxy.cran_mirror will be updated in-place
  ~ resource "nexus_repository_r_proxy" "cran_mirror" {
        id           = "cran-mirror"
        name         = "cran-mirror"
      ~ routing_rule = "another_routing" -> "allow_cran"
        # (1 unchanged attribute hidden)

        # (4 unchanged blocks hidden)
    }

@anmoel
Copy link
Member

anmoel commented Jun 13, 2024

@Edu-DevOps fix was released with version 2.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants