Skip to content

Commit b80079f

Browse files
committed
Remove support for sunset MariaDB Azure service
These systems were all turned off in Sept 2025: https://learn.microsoft.com/en-us/azure/mariadb/migrate/whats-happening-to-mariadb?utm_source=chatgpt.com Signed-off-by: Tim Smith <tsmith84@gmail.com>
1 parent 0f11da0 commit b80079f

File tree

8 files changed

+1
-804
lines changed

8 files changed

+1
-804
lines changed

providers/azure/config/config.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ Examples run in the Azure CLI:
4646
resources.DiscoveryPostgresFlexibleServers,
4747
resources.DiscoveryMySqlServers,
4848
resources.DiscoveryMySqlFlexibleServers,
49-
resources.DiscoveryMariaDbServers,
5049
resources.DiscoveryAksClusters,
5150
resources.DiscoveryAppServiceApps,
5251
resources.DiscoveryCacheRedis,
@@ -127,7 +126,6 @@ Examples run in the Azure CLI:
127126
"compute": nil,
128127
"mysql": nil,
129128
"postgresql": nil,
130-
"mariadb": nil,
131129
"aks": nil,
132130
"app-service": nil,
133131
"cache": nil,

providers/azure/go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ require (
1919
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/databricks/armdatabricks v1.1.0
2020
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub v1.3.0
2121
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/v2 v2.0.1
22-
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mariadb/armmariadb v1.2.0
2322
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor v0.11.0
2423
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/msi/armmsi v1.3.0
2524
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysql v1.2.0

providers/azure/go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,6 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub v1.3.0 h1
116116
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub v1.3.0/go.mod h1:djbLk3ngutFfQ9fSOM29UzywAkcBI1YUsuUnxTQGsqU=
117117
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/v2 v2.0.1 h1:nFZ7AvJqTpWobmnZlprsK6GucrByFsXWB+DwkhRxM9I=
118118
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/v2 v2.0.1/go.mod h1:ZNiswYTEPuQ/D+mHxONII+FeHHNNVQlJ5IUG88opjS0=
119-
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mariadb/armmariadb v1.2.0 h1:seh4IsOzJkO3AxKPSHWmBKbTtO/4kiSDPa7spQmMxDY=
120-
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mariadb/armmariadb v1.2.0/go.mod h1:DjMBNXv1qSHIv81Mj/MeAru4hk5WhOW4YZ40c+zo+Us=
121119
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor v0.11.0 h1:Ds0KRF8ggpEGg4Vo42oX1cIt/IfOhHWJBikksZbVxeg=
122120
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor v0.11.0/go.mod h1:jj6P8ybImR+5topJ+eH6fgcemSFBmU6/6bFF8KkwuDI=
123121
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/msi/armmsi v1.3.0 h1:L7G3dExHBgUxsO3qpTGhk/P2dgnYyW48yn7AO33Tbek=

providers/azure/resources/azure.lr

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ azure.subscription @defaults ("name") {
5050
mySql() azure.subscription.mySqlService
5151
// PostgreSQL resources in the subscription
5252
postgreSql() azure.subscription.postgreSqlService
53-
// MariaDB resources in the subscription
54-
mariaDb() azure.subscription.mariaDbService
5553
// Cosmos DB resources in the subscription
5654
cosmosDb() azure.subscription.cosmosDbService
5755
// Azure Key Vault resources in the subscription
@@ -2155,50 +2153,6 @@ private azure.subscription.mySqlService.flexibleServer @defaults("name location
21552153
firewallRules() []azure.subscription.sqlService.firewallrule
21562154
}
21572155

2158-
// Azure Database for MariaDB
2159-
private azure.subscription.mariaDbService {
2160-
// Subscription identifier
2161-
subscriptionId string
2162-
// List of MariaDB servers
2163-
servers() []azure.subscription.mariaDbService.server
2164-
}
2165-
2166-
// Azure Database for MariaDB server
2167-
private azure.subscription.mariaDbService.server @defaults("id name location") {
2168-
// MariaDB server ID
2169-
id string
2170-
// MariaDB server name
2171-
name string
2172-
// MariaDB server location
2173-
location string
2174-
// MariaDB server tags
2175-
tags map[string]string
2176-
// MariaDB server type
2177-
type string
2178-
// MariaDB server properties
2179-
properties dict
2180-
// MariaDB server configuration
2181-
configuration() []azure.subscription.sqlService.configuration
2182-
// MariaDB server databases
2183-
databases() []azure.subscription.mariaDbService.database
2184-
// MariaDB server firewall rules
2185-
firewallRules() []azure.subscription.sqlService.firewallrule
2186-
}
2187-
2188-
// Azure Database for MariaDB database
2189-
private azure.subscription.mariaDbService.database @defaults("id name") {
2190-
// MariaDB database ID
2191-
id string
2192-
// MariaDB database name
2193-
name string
2194-
// MariaDB database type
2195-
type string
2196-
// MariaDB database character set
2197-
charset string
2198-
// MariaDB database collation
2199-
collation string
2200-
}
2201-
22022156
// Azure Cosmos DB
22032157
private azure.subscription.cosmosDbService {
22042158
// Subscription identifier

providers/azure/resources/azure.lr.go

Lines changed: 0 additions & 423 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

providers/azure/resources/discovery.go

Lines changed: 1 addition & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ const (
3636
DiscoveryPostgresFlexibleServers = "postgres-flexible-servers"
3737
DiscoveryMySqlServers = "mysql-servers"
3838
DiscoveryMySqlFlexibleServers = "mysql-flexible-servers"
39-
DiscoveryMariaDbServers = "mariadb-servers"
4039
DiscoveryAksClusters = "aks-clusters"
4140
DiscoveryAppServiceApps = "app-service-webapps"
4241
DiscoveryCacheRedis = "cache-redis-instances"
@@ -66,7 +65,6 @@ var AllAPIResources = []string{
6665
DiscoveryPostgresFlexibleServers,
6766
DiscoveryMySqlServers,
6867
DiscoveryMySqlFlexibleServers,
69-
DiscoveryMariaDbServers,
7068
DiscoveryAksClusters,
7169
DiscoveryAppServiceApps,
7270
DiscoveryCacheRedis,
@@ -219,14 +217,6 @@ func Discover(runtime *plugin.Runtime, rootConf *inventory.Config) (*inventory.I
219217
assets = append(assets, flexibleServers...)
220218
}
221219

222-
if stringx.ContainsAnyOf(targets, DiscoveryMariaDbServers) {
223-
mariaDbServers, err := discoverMariadbServers(runtime, subsWithConfigs)
224-
if err != nil {
225-
return nil, err
226-
}
227-
assets = append(assets, mariaDbServers...)
228-
}
229-
230220
if stringx.ContainsAnyOf(targets, DiscoveryAksClusters) {
231221
aksClusters, err := discoverAksClusters(runtime, subsWithConfigs)
232222
if err != nil {
@@ -581,40 +571,6 @@ func discoverPostgresqlFlexibleServers(runtime *plugin.Runtime, subsWithConfigs
581571
return assets, nil
582572
}
583573

584-
func discoverMariadbServers(runtime *plugin.Runtime, subsWithConfigs []subWithConfig) ([]*inventory.Asset, error) {
585-
assets := []*inventory.Asset{}
586-
for _, subWithConfig := range subsWithConfigs {
587-
svc, err := NewResource(runtime, "azure.subscription.mariaDbService", map[string]*llx.RawData{
588-
"subscriptionId": llx.StringDataPtr(subWithConfig.sub.SubscriptionID),
589-
})
590-
if err != nil {
591-
return nil, err
592-
}
593-
mariaSvc := svc.(*mqlAzureSubscriptionMariaDbService)
594-
servers := mariaSvc.GetServers()
595-
if servers.Error != nil {
596-
return nil, servers.Error
597-
}
598-
for _, mysqlServ := range servers.Data {
599-
s := mysqlServ.(*mqlAzureSubscriptionMariaDbServiceServer)
600-
asset := mqlObjectToAsset(mqlObject{
601-
name: s.Name.Data,
602-
labels: interfaceMapToStr(s.Tags.Data),
603-
azureObject: azureObject{
604-
id: s.Id.Data,
605-
subscription: *subWithConfig.sub.SubscriptionID,
606-
tenant: subWithConfig.sub.TenantID,
607-
location: s.Location.Data,
608-
service: "mariadb",
609-
objectType: "server",
610-
},
611-
}, subWithConfig.conf, false)
612-
assets = append(assets, asset)
613-
}
614-
}
615-
return assets, nil
616-
}
617-
618574
func discoverAksClusters(runtime *plugin.Runtime, subsWithConfigs []subWithConfig) ([]*inventory.Asset, error) {
619575
assets := []*inventory.Asset{}
620576
for _, subWithConfig := range subsWithConfigs {
@@ -785,6 +741,7 @@ func discoverCosmosDb(runtime *plugin.Runtime, subsWithConfigs []subWithConfig)
785741
return assets, nil
786742
}
787743

744+
788745
func discoverStorageAccounts(runtime *plugin.Runtime, subsWithConfig []subWithConfig) ([]*inventory.Asset, error) {
789746
assets := []*inventory.Asset{}
790747
for _, subWithConfig := range subsWithConfig {
@@ -1065,10 +1022,6 @@ func getTitleFamily(azureObject azureObject) (azureObjectPlatformInfo, error) {
10651022
if azureObject.objectType == "flexible-server" {
10661023
return azureObjectPlatformInfo{title: "Azure MySQL Flexible Server", platform: "azure-mysql-flexible-server"}, nil
10671024
}
1068-
case "mariadb":
1069-
if azureObject.objectType == "server" {
1070-
return azureObjectPlatformInfo{title: "Azure MariaDB Server", platform: "azure-mariadb-server"}, nil
1071-
}
10721025
case "aks":
10731026
if azureObject.objectType == "cluster" {
10741027
return azureObjectPlatformInfo{title: "Azure AKS Cluster", platform: "azure-aks-cluster"}, nil

0 commit comments

Comments
 (0)