diff --git a/github/resource_github_repository.go b/github/resource_github_repository.go index 3b07d8ffba..88614b1d17 100644 --- a/github/resource_github_repository.go +++ b/github/resource_github_repository.go @@ -17,7 +17,10 @@ func resourceGithubRepository() *schema.Resource { Update: resourceGithubRepositoryUpdate, Delete: resourceGithubRepositoryDelete, Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, + State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + d.Set("auto_init", false) + return []*schema.ResourceData{d}, nil + }, }, Schema: map[string]*schema.Schema{ diff --git a/github/resource_github_repository_test.go b/github/resource_github_repository_test.go index 1884a351fa..327a3787cd 100644 --- a/github/resource_github_repository_test.go +++ b/github/resource_github_repository_test.go @@ -625,6 +625,7 @@ resource "github_repository" "foo" { allow_squash_merge = false allow_rebase_merge = false has_downloads = true + auto_init = false } `, randString, randString) }