Closed xgcssch closed 3 months ago
It's the same bug for the other type of groups, like npm and maven.
I can confirm that this problem still exists. Looking into it.
I´ve checked this and the issue seems to be in this schema attribute since TypeSet is used to represent an unordered collection of items. Terraform doc reference: https://developer.hashicorp.com/terraform/plugin/sdkv2/schemas/schema-types#typeset
We would need to use TypeList to preserver the order I believe
The problem still exists in the latest provider version
I can confirm that the problem still exists in version 2.1.0 of the datadriver, and this also affects ALL kind of groups (not just docker). The underlying issue was well pointed out in the comments above: The datadriver implementation uses a set, not a list, and therefore the ordered input gets reshuffled along the way.
Environment (although irrelevant due to the nature of this bug): Terraform 1.7.1 and Nexus RM Pro 3.62.0-01.
first, it is only fixed for docker groups
we will implement the same way for all repository types if someone can approve that the problem is fixed in version https://github.com/datadrivers/terraform-provider-nexus/releases/tag/v2.2.0
The merged PR applies to the base repository schema so it applied to all repository types.
This is working as expected for an npm repo:
the issue looks closed. please open again if not so
Is there an existing issue for this?
Community Note
Terraform Version
1.3.7
Nexus Provider Version
1.21.2
Nexus Version
3.37.3
Affected Resource(s)/Data Source(s)
nexus_repository_docker_group
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
Final order in Nexus after applying
Actual Behaviour
Final order in Nexus after applying
Funny: in the Terraform difference output the order is different too:
Steps to Reproduce
References
25 or #140