Add missing `return`s (#37240)

pull/37243/head
Sarah French 10 months ago committed by GitHub
parent 481bef3759
commit f31477f9ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -453,10 +453,10 @@ func (b *Backend) Configure(configVal cty.Value) tfdiags.Diagnostics {
needToLookupAccessKey := backendConfig.AccessKey == "" && backendConfig.SasToken == "" && !backendConfig.UseAzureADAuthentication
if backendConfig.ResourceGroupName == "" {
if needToLookupAccessKey {
backendbase.ErrorAsDiagnostics(fmt.Errorf("One of `access_key`, `sas_token`, `use_azuread_auth` and `resource_group_name` must be specifieid"))
return backendbase.ErrorAsDiagnostics(fmt.Errorf("One of `access_key`, `sas_token`, `use_azuread_auth` and `resource_group_name` must be specifieid"))
}
if backendConfig.LookupBlobEndpoint {
backendbase.ErrorAsDiagnostics(fmt.Errorf("`resource_group_name` is required when `lookup_blob_endpoint` is set"))
return backendbase.ErrorAsDiagnostics(fmt.Errorf("`resource_group_name` is required when `lookup_blob_endpoint` is set"))
}
}

Loading…
Cancel
Save