-
Notifications
You must be signed in to change notification settings - Fork 0
feat/forking-repository #1
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
Conversation
Testing import
|
Verify test import
|
plan result
|
apply result
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pulled this down and did some local testing. Import, delete and apply works good. so does plan.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pulled this down and did some local testing. Import, delete and apply works good. so does plan.
Resolves
integrations#2632
Summary of Changes
Before the change?
After the change?
I've added support for forking GitHub repositories to the GitHub Terraform Provider. This feature allows users to fork existing repositories using Terraform, supporting both user and organization accounts.
Key Implementations:
Fork Parameters: Added schema attributes for repository forking:
Fork Creation Logic: Implemented forking in the resourceGithubRepositoryCreate function:
Here are few tests/show case for different aspect of the above changes
creating fork and also fork from fork:
Note you can also use : export GITHUB_TOKEN="gh_xxx"
terraform init
terraform plan
here is the plan result:
#1 (comment)
terraform apply
here is the apply result:
#1 (comment)
Also importing existing resources :
Now lets say we forked a repo manually and now we need to import it in terraform so it is being tracked
first fork a repo called manual-test
And the result shows
#1 (comment)
verify the import:
#1 (comment)
Now time to destroy it which means it should also be able to destroy manually created fork
Pull request checklist
Does this introduce a breaking change?
Please see our docs on breaking changes to help!
extra dev notes (if you are running test directly in GO code):
export GITHUB_OWNER=ORG_NAME

export GITHUB_TOKEN=ghp_TOKEN
export TF_ACC=1
go build -o terraform-provider-github