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

Add ignoring feature for archived repositories

Open lens0021 opened this issue 3 years ago • 6 comments

This is a feature request.

Recently, I have archived a repository that has issue labels are managed by Terraform. When I try to delete the declarations of labels in my tf file, Terraform fails to delete the labels. I do not want to delete the issue labels, they are in a repository already achieved and I don't want to touch them.

Terraform Version

  • Terraform v0.14.8
  • provider registry.terraform.io/integrations/github v4.6.0

Affected Resource

  • github_issue_label

Debug Output

Error: DELETE https://api.github.com/repos/femiwiki/kubernetes/labels/REL1_35: 403 Repository was archived so is read-only. []

Expected Behavior

delete_on_destroy argument or something similar to the lifecycle Meta-Argument to avoid situations like above is provided

Actual Behavior

I have to remove the state manually, probably.

Steps to Reproduce

  1. Create a resource or import the state related to a repository.
  2. Archive the repository.
  3. Try to modify or delete the resource.

lens0021 avatar Mar 24 '21 08:03 lens0021