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

Not possible to set maven configuration on a nexus_repository_maven_group #389

Open
1 task done
thcuvelier opened this issue Oct 9, 2023 · 5 comments
Open
1 task done
Assignees
Labels
bug Something isn't working

Comments

@thcuvelier
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

Inpossible to setup on the maven group level the maven block
maven {
version_policy = "MIXED"
layout_policy = "STRICT"
content_disposition = "INLINE"
}

where in nexus administration console it's possible.

image

Terraform Version

1.5.7

Nexus Provider Version

1.22.0

Nexus Version

3.49.0

Affected Resource(s)/Data Source(s)

nexus_repository_maven_group

Terraform Configuration Files

resource "nexus_repository_maven_group" "maven-public" {
  name   = "maven-public"
  online = true

  group {
    member_names     = [,nexus_repository_maven_hosted.maven-snapshots.name,nexus_repository_maven_proxy.maven-releases.name]
  }

  maven {
    version_policy   = "MIXED"
    layout_policy    = "STRICT"
    content_disposition = "INLINE"
  }

  storage {
    blob_store_name                = "default"
    strict_content_type_validation = true
  }

}

resource "nexus_repository_maven_hosted" "maven-releases" {
  name   = "maven-releases"
  online = true

  component {
    proprietary_components = false
  }

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

  maven {
    version_policy   = "RELEASE"
    layout_policy    = "STRICT"
    content_disposition = "INLINE"
  }

}

resource "nexus_repository_maven_hosted" "maven-snapshots" {
  name   = "maven-snapshots"
  online = true

  component {
    proprietary_components = false
  }

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

  maven {
    version_policy   = "SNAPSHOT"
    layout_policy    = "STRICT"
    content_disposition = "INLINE"
  }

}

Debug Output/Panic Output

terraform apply
╷
│ Error: Unsupported block type
│
│   on __nexus-repos.tf line 38, in resource "nexus_repository_maven_group" "maven-public":
│   38:   maven {
│
│ Blocks of type "maven" are not expected here.

Expected Behaviour

Possibility to configure the maven block on the group level

Actual Behaviour

Not possible to configure the maven block on the group level

Steps to Reproduce

No response

References

No response

@thcuvelier thcuvelier added the bug Something isn't working label Oct 9, 2023
@anmoel
Copy link
Member

anmoel commented Oct 10, 2023

hi @thcuvelier,

it looks like it will be the same problem as issue #148. Can you confirm that?

kind regards
André

@anmoel anmoel self-assigned this Oct 10, 2023
@anmoel
Copy link
Member

anmoel commented Oct 10, 2023

it's looks like we can now set the configuration but cannot read the maven block from the nexus api

@thcuvelier
Copy link
Author

I confirm that this is the same problem as issue #148.

anmoel added a commit to datadrivers/go-nexus-client that referenced this issue Oct 11, 2023
…ing a MavenGroupRepository

The Nexus API only not returning the Maven block in its GET Response

belongs to datadrivers/terraform-provider-nexus#389
anmoel added a commit to datadrivers/go-nexus-client that referenced this issue Oct 11, 2023
…ing a MavenGroupRepository

The Nexus API only not returning the Maven block in its GET Response

belongs to datadrivers/terraform-provider-nexus#389
@anmoel
Copy link
Member

anmoel commented Oct 11, 2023

Hi @thcuvelier,
we will implement the maven block into the resource nexus_repository_maven_group.
But there are some problems. the Nexus API don't return the values for the maven block in a GET call.
so we only can change the maven configuration at creation or update of the resource. the resource can not detect changes in the group repository.

After implementing, we will open a new issue for that and will inform the developer of sonatype.

@thcuvelier
Copy link
Author

Thx waiting the new release

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
Status: High priority
Development

No branches or pull requests

2 participants