Skip to content

Resolve repo:pattern On github_branch_protection Import#599

Merged
jcudit merged 1 commit intomasterfrom
bp-import
Nov 13, 2020
Merged

Resolve repo:pattern On github_branch_protection Import#599
jcudit merged 1 commit intomasterfrom
bp-import

Conversation

@jcudit
Copy link
Copy Markdown
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
Copy Markdown
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!

@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