Giter Club home page Giter Club logo

Comments (13)

Nosmoht avatar Nosmoht commented on June 16, 2024

Hi @5obol,

please see the examples for nuget_proxy and docker_hub within README.md. The errors you got are only for repositories of type proxy.

from terraform-provider-nexus.

5obol avatar 5obol commented on June 16, 2024

Hi,
Thank you for such a quick reply and action on this.
Have just went through those two examples as well. And here what I have in a TF code:

resource "nexus_repository" "apt-proxy-bionic" {
  name   = "apt-proxy-bionic"
  format = "apt"
  type   = "proxy"
  online = true
  apt {
    distribution = "bionic"
  }
  negative_cache {
    enabled = true
    ttl     = 1440
  }
  http_client {
      auto_block = true
  }
  proxy {
    remote_url  = "http://archive.ubuntu.com/ubuntu/"
    metadata_max_age = "1440"
    content_max_age = "1440"
  }
  storage {
    blob_store_name                = "apt-internal"
    strict_content_type_validation = true
    write_policy                   = "ALLOW_ONCE"
  }
  depends_on = [nexus_blobstore.apt-internal]
}

Apply:

$ terraform apply -input=false "planfile"
nexus_repository.apt-proxy-bionic: Creating...
Error: could not create repository 'apt-proxy-bionic': HTTP: 400, [ {
  "id" : "PARAMETER flat",
  "message" : "must not be null"
}, {
  "id" : "PARAMETER type",
  "message" : "may not be empty"
} ]
  on repositories.tf line 1, in resource "nexus_repository" "apt-proxy-bionic":
   1: resource "nexus_repository" "apt-proxy-bionic" {
ERROR: Job failed: exit code 1

from terraform-provider-nexus.

Nosmoht avatar Nosmoht commented on June 16, 2024

Hi @5obol ,

the issue with parameter type can be fixed by adding authentication even if you don't use username and passwort, it would at least fix the issue. We have another issue to check if authentication can be omitted.

http_client {
      auto_block = true
      authentication {
		type = "username"
      }
  }

Parameter flat is really new to me. Which version of Nexus are u using?

from terraform-provider-nexus.

Nosmoht avatar Nosmoht commented on June 16, 2024

Found the flat parameter. Seems like following is missing.

   apt {
      distribution = "bionic"
      flat = false
   }

from terraform-provider-nexus.

Nosmoht avatar Nosmoht commented on June 16, 2024

Foo, this parameter is not yet implemented. I'll add it soon.

from terraform-provider-nexus.

5obol avatar 5obol commented on June 16, 2024

version

We are using Nexus 3.22.1-02

from terraform-provider-nexus.

fog1985 avatar fog1985 commented on June 16, 2024

Foo, this parameter is not yet implemented. I'll add it soon.

Cool,
Thank you @Nosmoht beforehand.
As I am facing pretty the same issue. Looking forward to having it added.

from terraform-provider-nexus.

ruedigerblock avatar ruedigerblock commented on June 16, 2024

Moin guys,
we created a new release v1.6.2 which should address this issue.
Please check ;-)

from terraform-provider-nexus.

fog1985 avatar fog1985 commented on June 16, 2024

Cool! Thank you! ;)

from terraform-provider-nexus.

fog1985 avatar fog1985 commented on June 16, 2024

Hi @Nosmoht,

All works well. Thank you.

1 more question. Is there a chance to get what data fields/outputs data source for repository has?
I am curious if it's possible to get for example a list of created privileges during the repository creation process and as the result create a role resources with those privileges.
If it's not a correct place to ask this question please let me know and I can raise another topic. :)

Regards,
Taras.

from terraform-provider-nexus.

fog1985 avatar fog1985 commented on June 16, 2024

Hi @ruedigerblock ,
Thank you as well! And including you into the thread too. :)
Went through everything and can't figure out how to get a list of created privileges by repository resource. Or as the result of repository creation.
Any hints, please?
Cuz trying to create a role with those privileges included and there is no way to get them. :)

from terraform-provider-nexus.

Nosmoht avatar Nosmoht commented on June 16, 2024

Hi @fog1985 ,

i'm closing this ticket as you've already opened #54 for the privileges. Thanks for your support.

from terraform-provider-nexus.

fog1985 avatar fog1985 commented on June 16, 2024

Sure. Thank you @Nosmoht .

from terraform-provider-nexus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.