Skip to content

Commit

Permalink
storage: fixing changes since the shim layer was merged
Browse files Browse the repository at this point in the history
  • Loading branch information
tombuildsstuff committed Nov 16, 2020
1 parent e5f62fd commit b248ab8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/helper/validation"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/clients"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/storage/parsers"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/storage/parse"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/storage/validate"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/timeouts"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils"
"github.com/tombuildsstuff/giovanni/storage/2019-12-12/datalakestore/paths"
Expand Down Expand Up @@ -65,7 +66,12 @@ func resourceArmStorageDataLakeGen2Path() *schema.Resource {
},

Schema: map[string]*schema.Schema{
"storage_account_id": AccountIDSchema(),
"storage_account_id": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
ValidateFunc: validate.StorageAccountID,
},

"filesystem_name": {
Type: schema.TypeString,
Expand Down Expand Up @@ -141,7 +147,7 @@ func resourceArmStorageDataLakeGen2PathCreate(d *schema.ResourceData, meta inter
ctx, cancel := timeouts.ForCreate(meta.(*clients.Client).StopContext, d)
defer cancel()

storageID, err := parsers.ParseAccountID(d.Get("storage_account_id").(string))
storageID, err := parse.ParseAccountID(d.Get("storage_account_id").(string))
if err != nil {
return err
}
Expand Down Expand Up @@ -235,7 +241,7 @@ func resourceArmStorageDataLakeGen2PathUpdate(d *schema.ResourceData, meta inter
return err
}

storageID, err := parsers.ParseAccountID(d.Get("storage_account_id").(string))
storageID, err := parse.ParseAccountID(d.Get("storage_account_id").(string))
if err != nil {
return err
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/terraform"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/acceptance"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/clients"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/storage/parsers"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/storage/parse"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils"
"github.com/tombuildsstuff/giovanni/storage/2019-12-12/datalakestore/paths"
)
Expand Down Expand Up @@ -145,7 +145,7 @@ func testCheckAzureRMStorageDataLakeGen2PathExists(resourceName string) resource

fileSystemName := rs.Primary.Attributes["filesystem_name"]
path := rs.Primary.Attributes["path"]
storageID, err := parsers.ParseAccountID(rs.Primary.Attributes["storage_account_id"])
storageID, err := parse.ParseAccountID(rs.Primary.Attributes["storage_account_id"])
if err != nil {
return err
}
Expand Down Expand Up @@ -174,7 +174,7 @@ func testCheckAzureRMStorageDataLakeGen2PathDestroy(s *terraform.State) error {

fileSystemName := rs.Primary.Attributes["filesystem_name"]
path := rs.Primary.Attributes["path"]
storageID, err := parsers.ParseAccountID(rs.Primary.Attributes["storage_account_id"])
storageID, err := parse.ParseAccountID(rs.Primary.Attributes["storage_account_id"])
if err != nil {
return err
}
Expand Down

0 comments on commit b248ab8

Please sign in to comment.