Azure Monitor: Remove references to Germany cloud (#60588)

This commit is contained in:
Andres Martinez Gotor 2022-12-21 11:51:57 +01:00 committed by GitHub
parent 2533b44cb6
commit 733dbe0163
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 7 additions and 25 deletions

View File

@ -109,12 +109,11 @@ datasources:
#### Supported cloud names #### Supported cloud names
| Azure Cloud | `cloudName` Value | | Azure Cloud | `cloudName` Value |
| ---------------------------------------------------- | -------------------------- | | ------------------------------------ | -------------------------- |
| **Microsoft Azure public cloud** | `azuremonitor` (_Default_) | | **Microsoft Azure public cloud** | `azuremonitor` (_Default_) |
| **Microsoft Chinese national cloud** | `chinaazuremonitor` | | **Microsoft Chinese national cloud** | `chinaazuremonitor` |
| **US Government cloud** | `govazuremonitor` | | **US Government cloud** | `govazuremonitor` |
| **Microsoft German national cloud ("Black Forest")** | `germanyazuremonitor` |
### Configure Managed Identity ### Configure Managed Identity

View File

@ -15,7 +15,6 @@ const (
azureMonitorPublic = "azuremonitor" azureMonitorPublic = "azuremonitor"
azureMonitorChina = "chinaazuremonitor" azureMonitorChina = "chinaazuremonitor"
azureMonitorUSGovernment = "govazuremonitor" azureMonitorUSGovernment = "govazuremonitor"
azureMonitorGermany = "germanyazuremonitor"
azureMonitorCustomized = "customizedazuremonitor" azureMonitorCustomized = "customizedazuremonitor"
) )

View File

@ -88,7 +88,7 @@ func TestCredentials_getAzureCloud(t *testing.T) {
t.Run("when auth type is managed identity", func(t *testing.T) { t.Run("when auth type is managed identity", func(t *testing.T) {
jsonData := simplejson.NewFromAny(map[string]interface{}{ jsonData := simplejson.NewFromAny(map[string]interface{}{
"azureAuthType": azcredentials.AzureAuthManagedIdentity, "azureAuthType": azcredentials.AzureAuthManagedIdentity,
"cloudName": azureMonitorGermany, "cloudName": azureMonitorUSGovernment,
}) })
t.Run("should be from server configuration regardless of datasource value", func(t *testing.T) { 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) { t.Run("when auth type is managed identity", func(t *testing.T) {
jsonData := simplejson.NewFromAny(map[string]interface{}{ jsonData := simplejson.NewFromAny(map[string]interface{}{
"azureAuthType": azcredentials.AzureAuthManagedIdentity, "azureAuthType": azcredentials.AzureAuthManagedIdentity,
"cloudName": azureMonitorGermany, "cloudName": azureMonitorUSGovernment,
"tenantId": "9b9d90ee-a5cc-49c2-b97e-0d1b0f086b5c", "tenantId": "9b9d90ee-a5cc-49c2-b97e-0d1b0f086b5c",
"clientId": "849ccbb0-92eb-4226-b228-ef391abd8fe6", "clientId": "849ccbb0-92eb-4226-b228-ef391abd8fe6",
}) })

View File

@ -25,12 +25,6 @@ var azUSGovManagement = types.AzRoute{
Headers: map[string]string{"x-ms-app": "Grafana"}, 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{ var azChinaManagement = types.AzRoute{
URL: "https://management.chinacloudapi.cn", URL: "https://management.chinacloudapi.cn",
Scopes: []string{"https://management.chinacloudapi.cn/.default"}, Scopes: []string{"https://management.chinacloudapi.cn/.default"},

View File

@ -19,7 +19,6 @@ const setup = (propsFunc?: (props: Props) => Props) => {
azureCloudOptions: [ azureCloudOptions: [
{ value: 'azuremonitor', label: 'Azure' }, { value: 'azuremonitor', label: 'Azure' },
{ value: 'govazuremonitor', label: 'Azure US Government' }, { value: 'govazuremonitor', label: 'Azure US Government' },
{ value: 'germanyazuremonitor', label: 'Azure Germany' },
{ value: 'chinaazuremonitor', label: 'Azure China' }, { value: 'chinaazuremonitor', label: 'Azure China' },
], ],
onCredentialsChange: jest.fn(), onCredentialsChange: jest.fn(),

View File

@ -11,7 +11,6 @@ import { AzureCredentialsForm } from './AzureCredentialsForm';
const azureClouds = [ const azureClouds = [
{ value: 'azuremonitor', label: 'Azure' }, { value: 'azuremonitor', label: 'Azure' },
{ value: 'govazuremonitor', label: 'Azure US Government' }, { value: 'govazuremonitor', label: 'Azure US Government' },
{ value: 'germanyazuremonitor', label: 'Azure Germany' },
{ value: 'chinaazuremonitor', label: 'Azure China' }, { value: 'chinaazuremonitor', label: 'Azure China' },
] as SelectableValue[]; ] as SelectableValue[];

View File

@ -37,8 +37,6 @@ function getDefaultAzureCloud(): string {
return 'chinaazuremonitor'; return 'chinaazuremonitor';
case AzureCloud.USGovernment: case AzureCloud.USGovernment:
return 'govazuremonitor'; return 'govazuremonitor';
case AzureCloud.Germany:
return 'germanyazuremonitor';
default: default:
throw new Error(`The cloud '${config.azure.cloud}' not supported.`); 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'; return 'https://portal.azure.cn';
case 'govazuremonitor': case 'govazuremonitor':
return 'https://portal.azure.us'; return 'https://portal.azure.us';
case 'germanyazuremonitor':
return 'https://portal.microsoftazure.de';
default: default:
throw new Error('The cloud not supported.'); throw new Error('The cloud not supported.');
} }

View File

@ -26,7 +26,6 @@ export enum AzureCloud {
Public = 'AzureCloud', Public = 'AzureCloud',
China = 'AzureChinaCloud', China = 'AzureChinaCloud',
USGovernment = 'AzureUSGovernment', USGovernment = 'AzureUSGovernment',
Germany = 'AzureGermanCloud',
None = '', None = '',
} }

View File

@ -4,7 +4,6 @@ export enum AzureCloud {
Public = 'AzureCloud', Public = 'AzureCloud',
China = 'AzureChinaCloud', China = 'AzureChinaCloud',
USGovernment = 'AzureUSGovernment', USGovernment = 'AzureUSGovernment',
Germany = 'AzureGermanCloud',
None = '', None = '',
} }
@ -12,7 +11,6 @@ export const KnownAzureClouds = [
{ value: AzureCloud.Public, label: 'Azure' }, { value: AzureCloud.Public, label: 'Azure' },
{ value: AzureCloud.China, label: 'Azure China' }, { value: AzureCloud.China, label: 'Azure China' },
{ value: AzureCloud.USGovernment, label: 'Azure US Government' }, { value: AzureCloud.USGovernment, label: 'Azure US Government' },
{ value: AzureCloud.Germany, label: 'Azure Germany' },
] as SelectableValue[]; ] as SelectableValue[];
export type AzureAuthType = 'msi' | 'clientsecret'; export type AzureAuthType = 'msi' | 'clientsecret';

View File

@ -17,7 +17,6 @@ const setup = (propsFunc?: (props: Props) => Props) => {
azureCloudOptions: [ azureCloudOptions: [
{ value: 'azuremonitor', label: 'Azure' }, { value: 'azuremonitor', label: 'Azure' },
{ value: 'govazuremonitor', label: 'Azure US Government' }, { value: 'govazuremonitor', label: 'Azure US Government' },
{ value: 'germanyazuremonitor', label: 'Azure Germany' },
{ value: 'chinaazuremonitor', label: 'Azure China' }, { value: 'chinaazuremonitor', label: 'Azure China' },
], ],
onCredentialsChange: jest.fn(), onCredentialsChange: jest.fn(),