From 176cdff8cecac1148c101a2dec4c070233f1474a Mon Sep 17 00:00:00 2001 From: Sam Levenick Date: Wed, 13 Nov 2019 10:45:23 -0800 Subject: [PATCH] Update bigtable import & tests to 3.0 (#2673) --- third_party/terraform/resources/resource_bigtable_table.go | 2 +- third_party/terraform/tests/resource_bigtable_table_test.go | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/third_party/terraform/resources/resource_bigtable_table.go b/third_party/terraform/resources/resource_bigtable_table.go index 290f585a3d98..5a24e522402f 100644 --- a/third_party/terraform/resources/resource_bigtable_table.go +++ b/third_party/terraform/resources/resource_bigtable_table.go @@ -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) } diff --git a/third_party/terraform/tests/resource_bigtable_table_test.go b/third_party/terraform/tests/resource_bigtable_table_test.go index 470b56c7f716..f8b7176fabe8 100644 --- a/third_party/terraform/tests/resource_bigtable_table_test.go +++ b/third_party/terraform/tests/resource_bigtable_table_test.go @@ -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), }, }, }) @@ -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), }, }, }) @@ -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), }, }, }) @@ -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), }, }, })