datadrivers/terraform-provider-nexus

Support for nexus_repository_cargo_hosted

cmanzur opened this issue ยท 3 comments

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

Description

I'm using a nexus plugin for CARGO repositories.
This is a repository for RUST projects.
It would be great to have a resource called nexus_repository_cargo_hosted

To make it simpler to test, follow this steps:

1- git clone https://github.com/sonatype-nexus-community/nexus-repository-cargo.git
2- cd nexus-repository-cargo

3- Create this file named Dockerfile.nexus-cargo inside the root directory of the project.

ARG NEXUS_VERSION=3.30.1

FROM maven:3-jdk-8-alpine AS build

COPY . /nexus-repository-cargo/
RUN cd /nexus-repository-cargo/; \
    mvn clean package;

FROM sonatype/nexus3:$NEXUS_VERSION

ARG DEPLOY_DIR=/opt/sonatype/nexus/deploy/
USER root
COPY --from=build /nexus-repository-cargo/target/nexus-repository-cargo-*.jar ${DEPLOY_DIR}
USER nexus

4- docker build -t nexus:cargo-plugin -f Dockerfile.nexus-cargo .

5- docker run --name nexus-cargo-local -p 8081:8081 -d nexus:cargo-plugin

6- Wait a few seconds and then run: docker exec -it nexus-cargo-local cat /nexus-data/admin.password && echo to get the admin password

7- Login as admin on localhost:8081 and you'll be able to create a Cargo Repository.

New or Affected Resource(s)/Data Source(s)

nexus_repository_cargo_hosted

Pro feature

  • Yes. Pro license Required

Community Plugin

No response

Potential Terraform Configuration

resource "nexus_repository_cargo_hosted" "cargo" {
  name = "cargo"
  online = true

  cleanup {
    policy_names = ["policy"]
  }

  storage {
    blob_store_name                = "default"
    strict_content_type_validation = true
    write_policy                   = "ALLOW"
  }
}

References

No response

This issue has been automatically marked as stale because it has had no activity in the last 90 days. It will be closed in 7 days if no further activity occurs. Leaving a comment starting with /fresh will mark this issue as not stale.

/refresh

/fresh