Skip to content

[BUG]: autolink_reference fails to be removed for non-existing repository #2627

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
limakzi opened this issue Apr 17, 2025 · 0 comments · May be fixed by #2628
Open
1 task done

[BUG]: autolink_reference fails to be removed for non-existing repository #2627

limakzi opened this issue Apr 17, 2025 · 0 comments · May be fixed by #2628
Labels
Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented

Comments

@limakzi
Copy link

limakzi commented Apr 17, 2025

Expected Behavior

The autolinkref resource for a non-existent repository will be removed.

Actual Behavior

Refreshing the autolinkref resource for a non-existent repository causes errors.

│ Error: DELETE https://api.github.com/<repo-url>: 404 Not Found []
[...]

Terraform Version

Terraform v1.11.3
on linux_arm64

Not relevant.

Affected Resource(s)

  • github_repository_autolink_reference

Terraform Configuration Files

resource "github_repository" "repo" {
  name         = "my-repo"
  description  = "GitHub repo managed by Terraform"
  private      = false
}

resource "github_repository_autolink_reference" "autolink" {
  repository = github_repository.repo.name
  key_prefix = "TICKET-"
  target_url_template = "https://example.com/TICKET?query=<num>"
}

Steps to Reproduce

terraform apply
  • Remove my-repo repository.

Debug Output

Panic Output

Code of Conduct

  • I agree to follow this project's Code of Conduct
@limakzi limakzi added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Apr 17, 2025
@limakzi limakzi linked a pull request Apr 17, 2025 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant