Skip to content

Commit

Permalink
Update bigtable import & tests to 3.0 (#2673)
Browse files Browse the repository at this point in the history
  • Loading branch information
slevenick authored and rileykarson committed Nov 13, 2019
1 parent c7756ac commit 176cdff
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion third_party/terraform/resources/resource_bigtable_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ func resourceBigtableTableImport(d *schema.ResourceData, meta interface{}) ([]*s
}

// Replace import id for the resource id
id, err := replaceVars(d, config, "{{name}}")
id, err := replaceVars(d, config, "projects/{{project}}/instances/{{instance_name}}/tables/{{name}}")
if err != nil {
return nil, fmt.Errorf("Error constructing id: %s", err)
}
Expand Down
5 changes: 0 additions & 5 deletions third_party/terraform/tests/resource_bigtable_table_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ func TestAccBigtableTable_basic(t *testing.T) {
ResourceName: "google_bigtable_table.table",
ImportState: true,
ImportStateVerify: true,
//TODO(rileykarson): Remove ImportStateId when id format is fixed in 3.0.0
ImportStateId: fmt.Sprintf("%s/%s", instanceName, tableName),
},
},
})
Expand All @@ -54,7 +52,6 @@ func TestAccBigtableTable_splitKeys(t *testing.T) {
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"split_keys"},
ImportStateId: fmt.Sprintf("%s/%s", instanceName, tableName),
},
},
})
Expand All @@ -79,7 +76,6 @@ func TestAccBigtableTable_family(t *testing.T) {
ResourceName: "google_bigtable_table.table",
ImportState: true,
ImportStateVerify: true,
ImportStateId: fmt.Sprintf("%s/%s", instanceName, tableName),
},
},
})
Expand All @@ -104,7 +100,6 @@ func TestAccBigtableTable_familyMany(t *testing.T) {
ResourceName: "google_bigtable_table.table",
ImportState: true,
ImportStateVerify: true,
ImportStateId: fmt.Sprintf("%s/%s", instanceName, tableName),
},
},
})
Expand Down

0 comments on commit 176cdff

Please sign in to comment.