Skip to content
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

Resolve repo:pattern On github_branch_protection Import #599

Merged
merged 1 commit into from
Nov 13, 2020
Merged

Conversation

jcudit
Copy link
Contributor

@jcudit jcudit commented Nov 11, 2020

Fixes https://github.com/terraform-providers/terraform-provider-github/issues/597

/cc @k24dizzle


github_team.second: Creating...
github_team.first: Creating...
github_repository.test: Creating...
github_team.first: Creation complete after 7s [id=4265287]
github_team.second: Creation complete after 7s [id=4265288]
github_repository.test: Creation complete after 10s [id=branch-protection-test]
github_branch_protection.test: Creating...
github_branch_protection.test: Creation complete after 3s [id=MDIwOkJyYW5jaFByb3RlY3Rpb25SdWxlMTgyNDY3NDE=]

Apply complete! Resources: 4 added, 0 changed, 0 destroyed.
$ terraform state rm github_branch_protection.test
Removed github_branch_protection.test
Successfully removed 1 resource instance(s).
$ terraform import -var "owner=${GITHUB_OWNER}"   -var "github_token=${GITHUB_TOKEN}" github_branch_protection.test branch-protection-test:main
github_branch_protection.test: Importing from ID "branch-protection-test:main"...
github_branch_protection.test: Import prepared!
  Prepared github_branch_protection for import
github_branch_protection.test: Refreshing state... [id=MDIwOkJyYW5jaFByb3RlY3Rpb25SdWxlMTgyNDY3NDE=]

Import successful!

The resources that were imported are shown above. These resources are now in
your Terraform state and will henceforth be managed by Terraform.

@ghost ghost added size/S Type: Documentation Improvements or additions to documentation labels Nov 11, 2020
@jcudit jcudit marked this pull request as ready for review November 11, 2020 15:55
@jcudit jcudit added this to the v4.0.1 milestone Nov 11, 2020
Copy link
Contributor

@k24dizzle k24dizzle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the quick turnaround!

github/resource_github_branch_protection.go Show resolved Hide resolved
@jcudit jcudit merged commit 156b503 into master Nov 13, 2020
@jcudit jcudit deleted the bp-import branch November 13, 2020 00:11
kfcampbell pushed a commit to kfcampbell/terraform-provider-github that referenced this pull request Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S Type: Documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't import github_branch_protection using repository:branch id
2 participants