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

resource/github_repository: Prefill auto_init during import #154

Merged
merged 1 commit into from
Sep 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion github/resource_github_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
1 change: 1 addition & 0 deletions github/resource_github_repository_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,7 @@ resource "github_repository" "foo" {
allow_squash_merge = false
allow_rebase_merge = false
has_downloads = true
auto_init = false
}
`, randString, randString)
}
Expand Down