terraform-provider-nexus
terraform-provider-nexus copied to clipboard
Importing existing repo fails
Describe the bug I already have configured repositories in nexus and would like to import them to terraform state file but it fails with message:
While attempting to import an existing object to "nexus_repository.myrepo", the provider detected that no object exists with the given id. Only pre-existing objects can be imported; │ check that the id is correct and that it is associated with the provider's configured region or endpoint, or use "terraform apply" to create a new remote object for this resource.
To Reproduce Steps to reproduce the behaviour:
- Create the repo in your TF
- run terraform import nexus_repository.myrepo myrepo
- Error message is displayed: Cannot import non-existent remote object
Expected behaviour I would expect terraform to import the repository and manage it through terrafom now on. I was able to import my blob stores this way
Nexus: OSS 3.37.3-02 Terraform 1.0.6 Provider 1.18.0
hi @MateuszKuchniak-TomTom,
thanks for your report. Unfortunately, the resource nexus_repository is almost deprecated. We are working on the split up of this resource. So we don't want to invest time in the resource. Which type and format of repository do you want to manage?
Maybe i can prioritize the creation of the needed resource.
kind regards André
Hi @anmoel
These are all maven repositories. From what I've seen, maven repos has not been split yet.
Kind Regards
Hi @MateuszKuchniak-TomTom,
please check our new releases and try the maven resources. let me know if it works or not.
regards André
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.