Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dependencies: updating to v0.27.0 of github.com/tombuildsstuff/giovanni #25702

Merged
merged 2 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ require (
github.com/google/uuid v1.4.0
github.com/hashicorp/go-azure-helpers v0.67.0
github.com/hashicorp/go-azure-sdk/resource-manager v0.20240417.1084633
github.com/hashicorp/go-azure-sdk/sdk v0.20240417.1084633
github.com/hashicorp/go-azure-sdk/sdk v0.20240422.1112441
github.com/hashicorp/go-hclog v1.5.0
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/go-uuid v1.0.3
Expand All @@ -29,7 +29,7 @@ require (
github.com/mitchellh/mapstructure v1.5.0
github.com/rickb777/date v1.12.5-0.20200422084442-6300e543c4d9
github.com/sergi/go-diff v1.2.0
github.com/tombuildsstuff/giovanni v0.26.1
github.com/tombuildsstuff/giovanni v0.27.0
github.com/tombuildsstuff/kermit v0.20240122.1123108
golang.org/x/crypto v0.21.0
golang.org/x/tools v0.13.0
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ github.com/hashicorp/go-azure-helpers v0.67.0 h1:0RY6mY3W3Ym2I+jExLtyLx96fh6p5n9
github.com/hashicorp/go-azure-helpers v0.67.0/go.mod h1:S4Bu66vyJvHA0trqHQB0YVGsISuF7HMH9tyEsMVlx8A=
github.com/hashicorp/go-azure-sdk/resource-manager v0.20240417.1084633 h1:gnSitHO7XjVdqOCLeifIwx4m6oRj/hbl4BKdCcvRHSk=
github.com/hashicorp/go-azure-sdk/resource-manager v0.20240417.1084633/go.mod h1:ddn6gE/zxtwsQK6b/40FF3zRpC8QbM/rbufJc36U01k=
github.com/hashicorp/go-azure-sdk/sdk v0.20240417.1084633 h1:PP+147mt/G4sizC3hQPqeTWF2nIOm9Qi2JDkWYR8uNs=
github.com/hashicorp/go-azure-sdk/sdk v0.20240417.1084633/go.mod h1:POOjeoqNp+mvlLBuibJTziUAkBZ7FxXGeGestwemL/w=
github.com/hashicorp/go-azure-sdk/sdk v0.20240422.1112441 h1:BGDyjzyjD+NhcL9cd+WhMIgAzY+/wKB30nD4h34sEPg=
github.com/hashicorp/go-azure-sdk/sdk v0.20240422.1112441/go.mod h1:Ts5vRL3KPw8iLit+4WSi1hOWlRCx++wJrCkMGj69xBY=
github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU=
github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg=
github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
Expand Down Expand Up @@ -225,8 +225,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tombuildsstuff/giovanni v0.26.1 h1:RZgnpyIHtgw0GXYpw3xttNk35obJNoI1hztCZsh/Djo=
github.com/tombuildsstuff/giovanni v0.26.1/go.mod h1:s7xbU2lN5Iz9MBglmDDv9p2QPbn6x3UkJBtpCfUerLs=
github.com/tombuildsstuff/giovanni v0.27.0 h1:3CDNjauK78FIhvvCp0SAHlvNcPTcofR6zQXvxwhk4zY=
github.com/tombuildsstuff/giovanni v0.27.0/go.mod h1:SviBdlwdVn2HyArdRABBqMUODBJ2adQHi+RFEVaO05I=
github.com/tombuildsstuff/kermit v0.20240122.1123108 h1:icQaxsv/ANv/KC4Sr0V1trrWA/XIL+3QAVBDpiSTgj8=
github.com/tombuildsstuff/kermit v0.20240122.1123108/go.mod h1:T3YBVFhRV4qA7SbnRaNE6eapIMpKDA9rG/V7Ocsjlno=
github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
Expand Down
60 changes: 55 additions & 5 deletions internal/services/storage/storage_account_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1113,13 +1113,13 @@ func TestAccAzureRMStorageAccount_shareSoftDelete(t *testing.T) {
})
}

func TestAccStorageAccount_allowSharedKeyAccess(t *testing.T) {
func TestAccStorageAccount_sharedKeyAccess(t *testing.T) {
data := acceptance.BuildTestData(t, "azurerm_storage_account", "test")
r := StorageAccountResource{}

data.ResourceTest(t, r, []acceptance.TestStep{
{
Config: r.allowSharedKeyAccess(data),
Config: r.sharedKeyAccessDisabled(data),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.ResourceName).ExistsInAzure(r),
check.That(data.ResourceName).Key("account_tier").HasValue("Standard"),
Expand All @@ -1129,8 +1129,9 @@ func TestAccStorageAccount_allowSharedKeyAccess(t *testing.T) {
check.That(data.ResourceName).Key("shared_access_key_enabled").HasValue("false"),
),
},
data.ImportStep(),
{
Config: r.allowSharedKeyAccessUpdated(data),
Config: r.sharedKeyAccessEnabled(data),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.ResourceName).ExistsInAzure(r),
check.That(data.ResourceName).Key("account_tier").HasValue("Standard"),
Expand All @@ -1140,6 +1141,31 @@ func TestAccStorageAccount_allowSharedKeyAccess(t *testing.T) {
check.That(data.ResourceName).Key("shared_access_key_enabled").HasValue("true"),
),
},
data.ImportStep(),
{
Config: r.sharedKeyAccessDisabled(data),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.ResourceName).ExistsInAzure(r),
check.That(data.ResourceName).Key("account_tier").HasValue("Standard"),
check.That(data.ResourceName).Key("account_replication_type").HasValue("LRS"),
check.That(data.ResourceName).Key("tags.%").HasValue("1"),
check.That(data.ResourceName).Key("tags.environment").HasValue("production"),
check.That(data.ResourceName).Key("shared_access_key_enabled").HasValue("false"),
),
},
data.ImportStep(),
})
}

func TestAccStorageAccount_sharedKeyAccessUnsupported(t *testing.T) {
data := acceptance.BuildTestData(t, "azurerm_storage_account", "test")
r := StorageAccountResource{}

data.ResourceTest(t, r, []acceptance.TestStep{
{
Config: r.sharedKeyAccessDisabledWithAzureADAuthDisabled(data),
ExpectError: regexp.MustCompile("Key based authentication is not permitted on this storage account"),
},
})
}

Expand Down Expand Up @@ -3785,7 +3811,7 @@ resource "azurerm_storage_account" "test" {
`, data.RandomInteger, data.Locations.Primary, data.RandomString)
}

func (r StorageAccountResource) allowSharedKeyAccess(data acceptance.TestData) string {
func (r StorageAccountResource) sharedKeyAccessDisabled(data acceptance.TestData) string {
return fmt.Sprintf(`
provider "azurerm" {
features {}
Expand Down Expand Up @@ -3813,7 +3839,7 @@ resource "azurerm_storage_account" "test" {
`, data.RandomInteger, data.Locations.Primary, data.RandomString)
}

func (r StorageAccountResource) allowSharedKeyAccessUpdated(data acceptance.TestData) string {
func (r StorageAccountResource) sharedKeyAccessEnabled(data acceptance.TestData) string {
return fmt.Sprintf(`
provider "azurerm" {
features {}
Expand Down Expand Up @@ -3841,6 +3867,30 @@ resource "azurerm_storage_account" "test" {
`, data.RandomInteger, data.Locations.Primary, data.RandomString)
}

func (r StorageAccountResource) sharedKeyAccessDisabledWithAzureADAuthDisabled(data acceptance.TestData) string {
return fmt.Sprintf(`
provider "azurerm" {
features {}
storage_use_azuread = false
}

resource "azurerm_resource_group" "test" {
name = "acctestRG-storage-%d"
location = "%s"
}

resource "azurerm_storage_account" "test" {
name = "unlikely23exst2acct%s"
resource_group_name = azurerm_resource_group.test.name

location = azurerm_resource_group.test.location
account_tier = "Standard"
account_replication_type = "LRS"
shared_access_key_enabled = false
}
`, data.RandomInteger, data.Locations.Primary, data.RandomString)
}

func (r StorageAccountResource) defaultToOAuthAuthentication(data acceptance.TestData) string {
return fmt.Sprintf(`
provider "azurerm" {
Expand Down
45 changes: 31 additions & 14 deletions vendor/github.com/hashicorp/go-azure-sdk/sdk/client/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading