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

nexus_repository resource - http_client block is optional in the doc, but not in reality #141

Closed
mpailloncy opened this issue Dec 9, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@mpailloncy
Copy link

Describe the bug
A clear and concise description of what the bug is.

The documentation for nexus_repository states that http_client block is optional, while it's actually required by the provider.

To Reproduce
Steps to reproduce the behavior:

  1. Given this nexus_repository definition:
resource "nexus_repository" "docker_quay_proxy" {
  name   = "docker-quay"
  format = "docker"
  type   = "proxy"

  proxy {
    remote_url       = "https://quay.io"
    content_max_age  = "1440"
    metadata_max_age = "1440"
  }

  docker {
    force_basic_auth = false
    http_port        = 0
    https_port       = 0
    v1enabled        = false
  }

  docker_proxy {
    index_type = "REGISTRY"
  }

  negative_cache {
    enabled = false
  }

  storage {
    blob_store_name                = "default"
    strict_content_type_validation = true
  }

}

  1. Try to plan/apply it
  2. An error like this one is displayed on "apply":
╷
│ Error: could not update repository 'docker-quay': HTTP: 400, [ {
│   "id" : "PARAMETER httpClient",
│   "message" : "must not be null"
│ } ]
│ 
│   with nexus_repository.docker_quay_proxy,
│   on repositories-docker.tf line 42, in resource "nexus_repository" "docker_quay_proxy":
│   42: resource "nexus_repository" "docker_quay_proxy" {
│ 
╵

Adding an empty block http_client {} in the nexus_repository def resolves the problem.

Expected behavior

http_block block should be optional

@mpailloncy mpailloncy added the bug Something isn't working label Dec 9, 2021
@sebbrandt87 sebbrandt87 self-assigned this Dec 10, 2021
@anmoel anmoel added this to Needs triage in Ticket tracker via automation Dec 12, 2021
@anmoel anmoel moved this from Needs triage to High priority in Ticket tracker Dec 12, 2021
@anmoel
Copy link
Member

anmoel commented Dec 12, 2021

Hi @mpailloncy ,

thanks for your report.
The nexus api required the http_client block.
We will fix the documentation and in the near future we will split all repository types into their own resources.
This way it is better documented and we can deal with it better.

regards
André

@anmoel
Copy link
Member

anmoel commented Dec 13, 2021

this feature is implemented in version v1.15.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
Development

No branches or pull requests

3 participants