Skip to content

Commit

Permalink
#29 - refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
apanasiuk-el committed Dec 11, 2024
1 parent 57c742a commit e37b7e3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions providers/azure_provider/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ func (ac *AzureConfigure) createKeyVaultResourceGroup(tenant string) error {
if err != nil {
var respErr *azcore.ResponseError
if errors.As(err, &respErr) && respErr.StatusCode == 403 {
zap.S().Warnf("permissions denied to create Azure resource group: %s", tenant+"-"+util.SopsRootName)
zap.S().Warnf("permission denied to create Azure resource group: %s", tenant+"-"+util.SopsRootName)
return nil
}

Expand All @@ -214,7 +214,7 @@ func (ac *AzureConfigure) existsKeyVaultResourceGroup(tenant string) (bool, erro
if err != nil {
var respErr *azcore.ResponseError
if errors.As(err, &respErr) && respErr.StatusCode == 403 {
zap.S().Warnf("permissions denied to check existence Azure resource group: %s",
zap.S().Warnf("permission denied to check existence of Azure resource group: %s",
tenant+"-"+util.SopsRootName)
return false, nil
}
Expand Down Expand Up @@ -252,7 +252,7 @@ func (ac *AzureConfigure) CreateAzureKeyVault(tenant string) error {
if err != nil {
var respErr *azcore.ResponseError
if errors.As(err, &respErr) && respErr.StatusCode == 403 {
zap.S().Warnf("permissions denied to create Azure key vault: %s",
zap.S().Warnf("permission denied to create Azure key vault: %s",
ac.KeyVaultName)
return nil
}
Expand Down Expand Up @@ -290,7 +290,7 @@ func (ac *AzureConfigure) GetAzureKeyVault(tenant string) (bool, error) {
}

if errors.As(err, &respErr) && respErr.StatusCode == 403 {
zap.S().Warnf("permissions denied to get Azure Key Vault: %s", ac.KeyVaultName)
zap.S().Warnf("permission denied to get Azure key vault: %s", ac.KeyVaultName)
return false, nil
}

Expand All @@ -316,7 +316,7 @@ func (ac *AzureConfigure) SetAzureSecret(keyName, value string) error {
if err != nil {
var respErr *azcore.ResponseError
if errors.As(err, &respErr) && respErr.StatusCode == 403 {
zap.S().Warnf("permissions denied to create Azure key vault secret: %s", keyName)
zap.S().Warnf("permission denied to create Azure key vault secret: %s", keyName)
return nil
}

Expand Down Expand Up @@ -346,7 +346,7 @@ func (ac *AzureConfigure) GetAzureSecrets() (map[string][]byte, error) {
if err != nil {
var respErr *azcore.ResponseError
if errors.As(err, &respErr) && respErr.StatusCode == 403 {
zap.S().Warnf("permissions denied to get list of Azure key vault secrets")
zap.S().Warnf("permission denied to list Azure key vault secrets")
return nil, nil
}

Expand All @@ -361,7 +361,7 @@ func (ac *AzureConfigure) GetAzureSecrets() (map[string][]byte, error) {
if err != nil {
var respErr *azcore.ResponseError
if errors.As(err, &respErr) && respErr.StatusCode == 403 {
zap.S().Warnf("permissions denied to get of Azure key vault secret: %s", name)
zap.S().Warnf("permission denied to get of Azure key vault secret: %s", name)
return nil, nil
}

Expand Down

0 comments on commit e37b7e3

Please sign in to comment.