Skip to content

Commit

Permalink
azurerm_storage_account additions
Browse files Browse the repository at this point in the history
- Support for File Encryption. Fixes #80
- Adding Import tests
- Support for Custom Domains on Storage Accounts. Fixes #15
- Splitting the storage account Tier and Replication out into separate fields. Incorporating #117 & Fixing #110
  • Loading branch information
tombuildsstuff committed Sep 28, 2017
1 parent 774c13c commit 77d13c7
Show file tree
Hide file tree
Showing 6 changed files with 609 additions and 103 deletions.
125 changes: 125 additions & 0 deletions azurerm/import_arm_storage_account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,128 @@ func TestAccAzureRMStorageAccount_importBasic(t *testing.T) {
},
})
}

func TestAccAzureRMStorageAccount_importPremium(t *testing.T) {
resourceName := "azurerm_storage_account.testsa"

ri := acctest.RandInt()
rs := acctest.RandString(4)
config := testAccAzureRMStorageAccount_premium(ri, rs, testLocation())

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureRMStorageAccountDestroy,
Steps: []resource.TestStep{
{
Config: config,
},

{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
},
},
})
}

func TestAccAzureRMStorageAccount_importNonStandardCasing(t *testing.T) {
resourceName := "azurerm_storage_account.testsa"

ri := acctest.RandInt()
rs := acctest.RandString(4)
config := testAccAzureRMStorageAccount_nonStandardCasing(ri, rs, testLocation())

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureRMStorageAccountDestroy,
Steps: []resource.TestStep{
{
Config: config,
},

{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
},
},
})
}

func TestAccAzureRMStorageAccount_importBlobEncryption(t *testing.T) {
resourceName := "azurerm_storage_account.testsa"

ri := acctest.RandInt()
rs := acctest.RandString(4)
config := testAccAzureRMStorageAccount_blobEncryption(ri, rs, testLocation())

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureRMStorageAccountDestroy,
Steps: []resource.TestStep{
{
Config: config,
},

{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
},
},
})
}

func TestAccAzureRMStorageAccount_importFileEncryption(t *testing.T) {
resourceName := "azurerm_storage_account.testsa"

ri := acctest.RandInt()
rs := acctest.RandString(4)
config := testAccAzureRMStorageAccount_fileEncryption(ri, rs, testLocation())

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureRMStorageAccountDestroy,
Steps: []resource.TestStep{
{
Config: config,
},

{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
},
},
})
}

func TestAccAzureRMStorageAccount_importEnableHttpsTrafficOnly(t *testing.T) {
resourceName := "azurerm_storage_account.testsa"

ri := acctest.RandInt()
rs := acctest.RandString(4)
config := testAccAzureRMStorageAccount_enableHttpsTrafficOnly(ri, rs, testLocation())

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureRMStorageAccountDestroy,
Steps: []resource.TestStep{
{
Config: config,
},

{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
},
},
})
}
Loading

0 comments on commit 77d13c7

Please sign in to comment.