Skip to content

Unable to import github repo due to auto_init #148

@gabrielsyapse

Description

@gabrielsyapse

Expected Behavior

Should be able to import an already created github repo and then run terraform apply without it wanting to recreate the repo.

Actual Behavior

In our terraform, we set the argument auto_init = true. Recently, there was a commit which changed the behavior. Before I was able to import an already created github repo into terraform state and then run apply, but now, it wants to recreate it, due to the ForceNew, which has been added. So, I can't safely import a repo.

auto_init:          "" => "true" (forces new resource)

For now, I have pinned to v1.1.0 and then was able to proceed and had the expected behavior. It just wanted to modify the single argument.

auto_init: "" => "true"

References

https://github.com/terraform-providers/terraform-provider-github/pull/135

Version

Terraform v0.11.7

Affected Resource(s)

github_repository

Metadata

Metadata

Assignees

Labels

Type: 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