mirror of
https://github.com/grafana/grafana.git
synced 2024-11-24 09:50:29 -06:00
Azure Monitor: Remove references to Germany cloud (#60588)
This commit is contained in:
parent
2533b44cb6
commit
733dbe0163
@ -109,12 +109,11 @@ datasources:
|
||||
|
||||
#### Supported cloud names
|
||||
|
||||
| Azure Cloud | `cloudName` Value |
|
||||
| ---------------------------------------------------- | -------------------------- |
|
||||
| **Microsoft Azure public cloud** | `azuremonitor` (_Default_) |
|
||||
| **Microsoft Chinese national cloud** | `chinaazuremonitor` |
|
||||
| **US Government cloud** | `govazuremonitor` |
|
||||
| **Microsoft German national cloud ("Black Forest")** | `germanyazuremonitor` |
|
||||
| Azure Cloud | `cloudName` Value |
|
||||
| ------------------------------------ | -------------------------- |
|
||||
| **Microsoft Azure public cloud** | `azuremonitor` (_Default_) |
|
||||
| **Microsoft Chinese national cloud** | `chinaazuremonitor` |
|
||||
| **US Government cloud** | `govazuremonitor` |
|
||||
|
||||
### Configure Managed Identity
|
||||
|
||||
|
@ -15,7 +15,6 @@ const (
|
||||
azureMonitorPublic = "azuremonitor"
|
||||
azureMonitorChina = "chinaazuremonitor"
|
||||
azureMonitorUSGovernment = "govazuremonitor"
|
||||
azureMonitorGermany = "germanyazuremonitor"
|
||||
azureMonitorCustomized = "customizedazuremonitor"
|
||||
)
|
||||
|
||||
|
@ -88,7 +88,7 @@ func TestCredentials_getAzureCloud(t *testing.T) {
|
||||
t.Run("when auth type is managed identity", func(t *testing.T) {
|
||||
jsonData := simplejson.NewFromAny(map[string]interface{}{
|
||||
"azureAuthType": azcredentials.AzureAuthManagedIdentity,
|
||||
"cloudName": azureMonitorGermany,
|
||||
"cloudName": azureMonitorUSGovernment,
|
||||
})
|
||||
|
||||
t.Run("should be from server configuration regardless of datasource value", func(t *testing.T) {
|
||||
@ -153,7 +153,7 @@ func TestCredentials_getAzureCredentials(t *testing.T) {
|
||||
t.Run("when auth type is managed identity", func(t *testing.T) {
|
||||
jsonData := simplejson.NewFromAny(map[string]interface{}{
|
||||
"azureAuthType": azcredentials.AzureAuthManagedIdentity,
|
||||
"cloudName": azureMonitorGermany,
|
||||
"cloudName": azureMonitorUSGovernment,
|
||||
"tenantId": "9b9d90ee-a5cc-49c2-b97e-0d1b0f086b5c",
|
||||
"clientId": "849ccbb0-92eb-4226-b228-ef391abd8fe6",
|
||||
})
|
||||
|
@ -25,12 +25,6 @@ var azUSGovManagement = types.AzRoute{
|
||||
Headers: map[string]string{"x-ms-app": "Grafana"},
|
||||
}
|
||||
|
||||
var azGermanyManagement = types.AzRoute{
|
||||
URL: "https://management.microsoftazure.de",
|
||||
Scopes: []string{"https://management.microsoftazure.de/.default"},
|
||||
Headers: map[string]string{"x-ms-app": "Grafana"},
|
||||
}
|
||||
|
||||
var azChinaManagement = types.AzRoute{
|
||||
URL: "https://management.chinacloudapi.cn",
|
||||
Scopes: []string{"https://management.chinacloudapi.cn/.default"},
|
||||
|
@ -19,7 +19,6 @@ const setup = (propsFunc?: (props: Props) => Props) => {
|
||||
azureCloudOptions: [
|
||||
{ value: 'azuremonitor', label: 'Azure' },
|
||||
{ value: 'govazuremonitor', label: 'Azure US Government' },
|
||||
{ value: 'germanyazuremonitor', label: 'Azure Germany' },
|
||||
{ value: 'chinaazuremonitor', label: 'Azure China' },
|
||||
],
|
||||
onCredentialsChange: jest.fn(),
|
||||
|
@ -11,7 +11,6 @@ import { AzureCredentialsForm } from './AzureCredentialsForm';
|
||||
const azureClouds = [
|
||||
{ value: 'azuremonitor', label: 'Azure' },
|
||||
{ value: 'govazuremonitor', label: 'Azure US Government' },
|
||||
{ value: 'germanyazuremonitor', label: 'Azure Germany' },
|
||||
{ value: 'chinaazuremonitor', label: 'Azure China' },
|
||||
] as SelectableValue[];
|
||||
|
||||
|
@ -37,8 +37,6 @@ function getDefaultAzureCloud(): string {
|
||||
return 'chinaazuremonitor';
|
||||
case AzureCloud.USGovernment:
|
||||
return 'govazuremonitor';
|
||||
case AzureCloud.Germany:
|
||||
return 'germanyazuremonitor';
|
||||
default:
|
||||
throw new Error(`The cloud '${config.azure.cloud}' not supported.`);
|
||||
}
|
||||
@ -52,8 +50,6 @@ export function getAzurePortalUrl(azureCloud: string): string {
|
||||
return 'https://portal.azure.cn';
|
||||
case 'govazuremonitor':
|
||||
return 'https://portal.azure.us';
|
||||
case 'germanyazuremonitor':
|
||||
return 'https://portal.microsoftazure.de';
|
||||
default:
|
||||
throw new Error('The cloud not supported.');
|
||||
}
|
||||
|
@ -26,7 +26,6 @@ export enum AzureCloud {
|
||||
Public = 'AzureCloud',
|
||||
China = 'AzureChinaCloud',
|
||||
USGovernment = 'AzureUSGovernment',
|
||||
Germany = 'AzureGermanCloud',
|
||||
None = '',
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,6 @@ export enum AzureCloud {
|
||||
Public = 'AzureCloud',
|
||||
China = 'AzureChinaCloud',
|
||||
USGovernment = 'AzureUSGovernment',
|
||||
Germany = 'AzureGermanCloud',
|
||||
None = '',
|
||||
}
|
||||
|
||||
@ -12,7 +11,6 @@ export const KnownAzureClouds = [
|
||||
{ value: AzureCloud.Public, label: 'Azure' },
|
||||
{ value: AzureCloud.China, label: 'Azure China' },
|
||||
{ value: AzureCloud.USGovernment, label: 'Azure US Government' },
|
||||
{ value: AzureCloud.Germany, label: 'Azure Germany' },
|
||||
] as SelectableValue[];
|
||||
|
||||
export type AzureAuthType = 'msi' | 'clientsecret';
|
||||
|
@ -17,7 +17,6 @@ const setup = (propsFunc?: (props: Props) => Props) => {
|
||||
azureCloudOptions: [
|
||||
{ value: 'azuremonitor', label: 'Azure' },
|
||||
{ value: 'govazuremonitor', label: 'Azure US Government' },
|
||||
{ value: 'germanyazuremonitor', label: 'Azure Germany' },
|
||||
{ value: 'chinaazuremonitor', label: 'Azure China' },
|
||||
],
|
||||
onCredentialsChange: jest.fn(),
|
||||
|
Loading…
Reference in New Issue
Block a user