Expected Behavior
We transferred a repository from Org A to a new Org Z (both in our GitHub Enterprise) .
After performing the transfer I removed the Terraform block that created and controlled the repository in the TF code controlling Org A, but left the code in the TF code controlling Org Z.
Actual Behavior
My expectation is that only the state files would get cleaned up, and no actual repo removals would occur as the repository existed in Org Z now.
Terraform Version
required_version = "> 1.12"
required_providers {
github = {
source = "integrations/github"
version = "> 6.6.0"
}
Affected Resource(s)
Terraform Configuration Files
module "RepoName" {
source = "../modules/org_repository"
name = "RepoName"
description = ""
topics = [
"tsql"
]
protected_branches_ruleset = local.default_protected_branches_ruleset.main
admin-members = [
local.users.redactedUser1,
local.users.redactedUser2
]
write-members = distinct(concat(
local.global-users.write-members,
[
local.users.redacted-user3
local.users.redacted-user4,
.....
local.users.recacted-userX,
]
))
}
Steps to Reproduce
Sequence of events
- Created a new github.com// repo via Terraform https://github.com//github-terraform-repository
- Manually deleted github.com// repo leaving the terraform state files as they were. This is what controls repos / teams / etc in github.com/
- Changed ownership of github.com// from to which transferred the repo over to
- I realized the terraform code controlling was breaking as I didn't remove from https://github.com//github-terraform-repository so I removed from the org's terraform and pushed through a change, which I expected to only clean up local Terraform state files for
- The removal of in https://github.com//github-terraform-repository via https://github.com//github-terraform-repository/actions/runs/###### reached across orgs and deleted it from the github.com/ org, which is unexpected.
PAT used for this DOES have access to both orgs, however, I didn't expect a change in terraform in one org to reach across org boundaries find the repo in it's "new home" and remove it from there.
Debug Output
Panic Output
Code of Conduct
Expected Behavior
We transferred a repository from Org A to a new Org Z (both in our GitHub Enterprise) .
After performing the transfer I removed the Terraform block that created and controlled the repository in the TF code controlling Org A, but left the code in the TF code controlling Org Z.
Actual Behavior
My expectation is that only the state files would get cleaned up, and no actual repo removals would occur as the repository existed in Org Z now.
Terraform Version
required_version = "
> 1.12"> 6.6.0"required_providers {
github = {
source = "integrations/github"
version = "
}
Affected Resource(s)
Terraform Configuration Files
Steps to Reproduce
Sequence of events
PAT used for this DOES have access to both orgs, however, I didn't expect a change in terraform in one org to reach across org boundaries find the repo in it's "new home" and remove it from there.
Debug Output
Panic Output
Code of Conduct