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

Move log statement for storage bucket #1126

Merged
merged 1 commit into from
Feb 23, 2018
Merged
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
2 changes: 1 addition & 1 deletion google/resource_storage_bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ func resourceStorageBucketRead(d *schema.ResourceData, meta interface{}) error {
if err != nil {
return handleNotFoundError(err, d, fmt.Sprintf("Storage Bucket %q", d.Get("name").(string)))
}
log.Printf("[DEBUG] Read bucket %v at location %v\n\n", res.Name, res.SelfLink)

// We need to get the project associated with this bucket because otherwise import
// won't work properly. That means we need to call the projects.get API with the
Expand All @@ -416,7 +417,6 @@ func resourceStorageBucketRead(d *schema.ResourceData, meta interface{}) error {
// the user intends to use the default provider project, or because the resource
// is currently being imported, we will read it from the API.
if _, ok := d.GetOk("project"); !ok {
log.Printf("[DEBUG] Read bucket %v at location %v\n\n", res.Name, res.SelfLink)
proj, err := config.clientCompute.Projects.Get(strconv.FormatUint(res.ProjectNumber, 10)).Do()
if err != nil {
return err
Expand Down