Skip to content

Cant run plan after manually deleting resources in the UI that are in the state #407

Closed
@lukonjun

Description

Describe the bug
When manually deleting a Replication Rule in Harbor (via UI) that is in the terraform state the terraform plan fails afterwards.

To Reproduce

  1. Create a Replication Rule via Terraform
  2. Run terraform apply, the resource is create and in the terraform state
  3. Delete via the Harbor UI
  4. Planning failed. OpenTofu encountered an error while generating this plan. Error: Resource not found harbor_replication.replication_name

Expected behavior
I compared this to the aws provider, this would be the expected behaviour in imo

  1. Create S3 Bucket via Terraform
  2. Run terraform apply, the resource is create and in the terraform state
  3. Delete via the AWS Console
  4. Run a terraform plan "1 to add, 0 to change, 0 to destroy"
  5. Run a terraform apply "1 added, 0 changed, 0 destroyed" Recreates the manuall deleted s3 bucket

Additional context
I assume the same behaviour applies for many other resources like projects, members and others.

  • Provider Version 3.10.5
  • Terraform Version OpenTofu Something
  • Harbor Version v2.9.0

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions