From 9d93f157fbdcd7ed05847a7289481a16fb912dba Mon Sep 17 00:00:00 2001 From: Thomas Vendetta Date: Fri, 5 Apr 2019 15:53:40 -0400 Subject: [PATCH] Remove exists function --- aws/resource_aws_glue_catalog_table.go | 28 -------------------------- 1 file changed, 28 deletions(-) diff --git a/aws/resource_aws_glue_catalog_table.go b/aws/resource_aws_glue_catalog_table.go index 979d7a52cea4..4c0084369ef2 100644 --- a/aws/resource_aws_glue_catalog_table.go +++ b/aws/resource_aws_glue_catalog_table.go @@ -16,7 +16,6 @@ func resourceAwsGlueCatalogTable() *schema.Resource { Read: resourceAwsGlueCatalogTableRead, Update: resourceAwsGlueCatalogTableUpdate, Delete: resourceAwsGlueCatalogTableDelete, - Exists: resourceAwsGlueCatalogTableExists, Importer: &schema.ResourceImporter{ State: schema.ImportStatePassthrough, }, @@ -339,33 +338,6 @@ func resourceAwsGlueCatalogTableDelete(d *schema.ResourceData, meta interface{}) return nil } -func resourceAwsGlueCatalogTableExists(d *schema.ResourceData, meta interface{}) (bool, error) { - glueconn := meta.(*AWSClient).glueconn - catalogID, dbName, name, tableIdErr := readAwsGlueTableID(d.Id()) - if tableIdErr != nil { - return false, tableIdErr - } - - log.Printf("[DEBUG] Glue Catalog Table: %s:%s:%s", catalogID, dbName, name) - - input := &glue.GetTableInput{ - CatalogId: aws.String(catalogID), - DatabaseName: aws.String(dbName), - Name: aws.String(name), - } - - _, err := glueconn.GetTable(input) - - if err != nil { - if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { - return false, nil - } - return false, err - } - - return true, nil -} - func expandGlueTableInput(d *schema.ResourceData) *glue.TableInput { tableInput := &glue.TableInput{ Name: aws.String(d.Get("name").(string)),