diff --git a/src/Api/Models/Response/ConfigResponseModel.cs b/src/Api/Models/Response/ConfigResponseModel.cs index 2e85a3a30d..e560271c00 100644 --- a/src/Api/Models/Response/ConfigResponseModel.cs +++ b/src/Api/Models/Response/ConfigResponseModel.cs @@ -28,6 +28,7 @@ public class ConfigResponseModel : ResponseModel GitHash = AssemblyHelpers.GetGitHash(); Environment = new EnvironmentConfigResponseModel { + CloudRegion = globalSettings.BaseServiceUri.CloudRegion, Vault = globalSettings.BaseServiceUri.Vault, Api = globalSettings.BaseServiceUri.Api, Identity = globalSettings.BaseServiceUri.Identity, @@ -46,6 +47,7 @@ public class ServerConfigResponseModel public class EnvironmentConfigResponseModel { + public string CloudRegion { get; set; } public string Vault { get; set; } public string Api { get; set; } public string Identity { get; set; } diff --git a/src/Core/Settings/GlobalSettings.cs b/src/Core/Settings/GlobalSettings.cs index 3c3d3e0c55..008bf46eff 100644 --- a/src/Core/Settings/GlobalSettings.cs +++ b/src/Core/Settings/GlobalSettings.cs @@ -143,6 +143,7 @@ public class GlobalSettings : IGlobalSettings _globalSettings = globalSettings; } + public string CloudRegion { get; set; } public string Vault { get; set; } public string VaultWithHash => $"{Vault}/#"; diff --git a/src/Core/Settings/IBaseServiceUriSettings.cs b/src/Core/Settings/IBaseServiceUriSettings.cs index 0550ae3e67..0acb504a2b 100644 --- a/src/Core/Settings/IBaseServiceUriSettings.cs +++ b/src/Core/Settings/IBaseServiceUriSettings.cs @@ -3,6 +3,7 @@ namespace Bit.Core.Settings; public interface IBaseServiceUriSettings { + string CloudRegion { get; set; } string Vault { get; set; } string VaultWithHash { get; } string Api { get; set; } diff --git a/util/Setup/EnvironmentFileBuilder.cs b/util/Setup/EnvironmentFileBuilder.cs index bba4180858..5babc6ca88 100644 --- a/util/Setup/EnvironmentFileBuilder.cs +++ b/util/Setup/EnvironmentFileBuilder.cs @@ -73,6 +73,7 @@ public class EnvironmentFileBuilder _globalOverrideValues = new Dictionary { ["globalSettings__baseServiceUri__vault"] = _context.Config.Url, + ["globalSettings__baseServiceUri__cloudVaultRegion"] = "US", ["globalSettings__sqlServer__connectionString"] = $"\"{dbConnectionString.Replace("\"", "\\\"")}\"", ["globalSettings__identityServer__certificatePassword"] = _context.Install?.IdentityCertPassword, ["globalSettings__internalIdentityKey"] = _context.Stub ? "RANDOM_IDENTITY_KEY" :