Skip to content

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

Open
@limakzi

Description

@limakzi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: TriageThis is being looked at and prioritizedType: BugSomething isn't working as documented

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions