terraform-provider-nexus icon indicating copy to clipboard operation
terraform-provider-nexus copied to clipboard

Importing existing repo fails

Open MateuszKuchniak-TomTom opened this issue 3 years ago • 3 comments

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:

  1. Create the repo in your TF
  2. run terraform import nexus_repository.myrepo myrepo
  3. 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

MateuszKuchniak-TomTom avatar Feb 16 '22 10:02 MateuszKuchniak-TomTom

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é

anmoel avatar Feb 18 '22 08:02 anmoel

Hi @anmoel

These are all maven repositories. From what I've seen, maven repos has not been split yet.

Kind Regards

MateuszKuchniak-TomTom avatar Mar 01 '22 12:03 MateuszKuchniak-TomTom

Hi @MateuszKuchniak-TomTom,

please check our new releases and try the maven resources. let me know if it works or not.

regards André

anmoel avatar Jun 15 '22 17:06 anmoel

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.

github-actions[bot] avatar Oct 25 '22 08:10 github-actions[bot]