terraform-provider-nexus
terraform-provider-nexus copied to clipboard
Not possible to set maven configuration on a nexus_repository_maven_group
Is there an existing issue for this?
- [X] I have searched the existing issues
Community Note
- Please vote on this issue by adding a :thumbsup: 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.
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
hi @thcuvelier,
it looks like it will be the same problem as issue #148. Can you confirm that?
kind regards André
it's looks like we can now set the configuration but cannot read the maven block from the nexus api
I confirm that this is the same problem as issue #148.
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.
Thx waiting the new release