Closed
Description
Describe the bug
I am trying to migrate the configuration for the existing harbor enviroment to terraform. By this, I found out, that the defined OIDC Admin Group has not the same permissions like the local admin user by using terraform.
With my OIDC User which is in the Admin Group, I can create anything in the harbor application (GUI). I can also use terraform import
for projects, that is working.
But I can´t e.q. use terraform import
to import retention policies.
There I get the following error:
terraform import 'module.projects.harbor_retention_policy.standard_retention_policies["ap"]' '/retentions/39'
module.projects.harbor_retention_policy.standard_retention_policies["ap"]: Importing from ID "/retentions/39"...
module.projects.harbor_retention_policy.standard_retention_policies["ap"]: Import prepared!
Prepared harbor_retention_policy for import
module.projects.harbor_retention_policy.standard_retention_policies["ap"]: Refreshing state... [id=/retentions/39]
╷
│ Error: [ERROR] unexpected status code got: 401 expected: 200
│ {"errors":[{"code":"UNAUTHORIZED","message":"unauthorized"}]}
│
│
│
To Reproduce
Steps to reproduce the behavior
Expected behavior
terraform import 'module.projects.harbor_retention_policy.standard_retention_policies["ap"]' '/retentions/39'
module.projects.harbor_retention_policy.standard_retention_policies["ap"]: Importing from ID "/retentions/39"...
module.projects.harbor_retention_policy.standard_retention_policies["ap"]: Import prepared!
Prepared harbor_retention_policy for import
module.projects.harbor_retention_policy.standard_retention_policies["ap"]: Refreshing state... [id=/retentions/39]
Import successful!
The resources that were imported are shown above. These resources are now in
your Terraform state and will henceforth be managed by Terraform.
Additional context
Add any other context about the problem here.
Provider Version: 3.8.4
Terraform Version: 1.4.3-dev
Harbor Version: v2.8.0-89ef156d
Metadata
Metadata
Assignees
Labels
No labels