Skip to content

Commit db012a9

Browse files
tas50claude
andauthored
⭐ Add Log Analytics Workspace and Recovery Services Vault resources (#7111)
* ⭐ Add Log Analytics Workspace and Recovery Services Vault resources Add Log Analytics Workspace (20 resource types) under monitorService with capping, features, data exports, linked services, and private link scoped resources. Add typed workspace() cross-reference from Application Insights. Add Recovery Services Vault with security settings (soft delete, immutability), CMK encryption with Key Vault key cross-ref, monitoring alerts, storage redundancy, backup vault config, backup policies, and protected items. Both services use shared privateEndpointConnection type. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🧹 Address review: fix backupConfig error handling, add spelling words Only swallow 403/404 errors in backupConfig(), propagate all other errors. Add "cmk" and "iaa" to spelling expect list. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🧹 Add case-sensitive spelling entries for Cmk and Iaa Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🧹 Log warning on unparseable Azure date strings Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Update expect.txt Signed-off-by: Tim Smith <tsmith84@gmail.com> --------- Signed-off-by: Tim Smith <tsmith84@gmail.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 00f014e commit db012a9

File tree

11 files changed

+3683
-10
lines changed

11 files changed

+3683
-10
lines changed

.github/actions/spelling/expect.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ cloudflare
4343
Clusterwide
4444
cmdline
4545
cmek
46+
Cmk
4647
cmnd
4748
cname
4849
compressratio
@@ -117,6 +118,7 @@ hostedzone
117118
hostkeys
118119
hotlink
119120
hvm
121+
Iaa
120122
iana
121123
iap
122124
iccid
@@ -199,10 +201,10 @@ openssl
199201
openzfs
200202
orstatement
201203
ospf
204+
pagerduty
202205
panos
203206
parallelquery
204207
PAYG
205-
pagerduty
206208
persistentvolume
207209
persistentvolumeclaim
208210
Pids
@@ -241,10 +243,10 @@ Sas
241243
sbom
242244
scim
243245
scm
244-
secureboot
245246
SECRETID
246247
secretmanager
247248
SECRETVALUE
249+
secureboot
248250
selfservice
249251
serviceconnection
250252
serviceprincipals

providers/azure/go.mod

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@ require (
2626
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysql v1.2.0
2727
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers v1.2.0
2828
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v9 v9.0.0
29+
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights v1.2.0
2930
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql v1.2.0
3031
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/v5 v5.0.0
32+
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservices/v2 v2.1.0
33+
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4 v4.2.0
3134
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redis/armredis/v3 v3.3.0
3235
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/v3 v3.0.1
3336
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armsubscriptions v1.3.0

providers/azure/go.sum

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,16 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleserv
130130
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers v1.2.0/go.mod h1:0mKVz3WT8oNjBunT1zD/HPwMleQ72QClMa7Gmsm+6Kc=
131131
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v9 v9.0.0 h1:CbHDMVJhcJSmXenq+UDWyIjumzVkZIb5pVUGzsCok5M=
132132
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v9 v9.0.0/go.mod h1:raqbEXrok4aycS74XoU6p9Hne1dliAFpHLizlp+qJoM=
133+
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights v1.2.0 h1:4FlNvfcPu7tTvOgOzXxIbZLvwvmZq1OdhQUdIa9g2N4=
134+
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights v1.2.0/go.mod h1:A4nzEXwVd5pAyneR6KOvUAo72svUc5rmCzRHhAbP6lA=
133135
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql v1.2.0 h1:0hXKrsbh2M6CQyW0TDC9Bsyd99vQmrOxiBTUfQHZjPA=
134136
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql v1.2.0/go.mod h1:bvZZor36Jg9q9kouuMyfJ+ay77+qK+YUfThXH1FdXjU=
135137
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/v5 v5.0.0 h1:S7K+MLPEYe+g9AX9dLKldBpYV03bPl7zeDaWhiNDqqs=
136138
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/v5 v5.0.0/go.mod h1:EHRrmrnS2Q8fB3+DE30TTk04JLqjui5ZJEF7eMVQ2/M=
139+
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservices/v2 v2.1.0 h1:1JdyrPv/UPMSAm+As/+fRqyRU6IP1KqiIm3NHuURSlQ=
140+
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservices/v2 v2.1.0/go.mod h1:u+oD8BX3AzcZs4wo/geQg2BysfY1qjtJDSuzrBSll1Y=
141+
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4 v4.2.0 h1:GOtQKZTIc4/HnWIEqGqtkMHLXIlwa4GpT8BB5JGH+tc=
142+
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4 v4.2.0/go.mod h1:o1BW30aoyqKYcQKAMNWs0UAkT30Z2FZzmCNo7hrGHjM=
137143
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redis/armredis/v3 v3.3.0 h1:EkL5dmUoy1OlzVfsbkcHayOvOJgheyRYL3wM/RHizzg=
138144
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redis/armredis/v3 v3.3.0/go.mod h1:DiazWkJHUUKUZGpIdV7JhDTjebBxdfsJ386dE5w7G3o=
139145
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeployments v0.2.0 h1:bYq3jfB2x36hslKMHyge3+esWzROtJNk/4dCjsKlrl4=

providers/azure/resources/azure.lr

Lines changed: 260 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ azure.subscription @defaults ("name") {
7676
synapse() azure.subscription.synapseService
7777
// Container Registry resources in the subscription
7878
containerRegistry() azure.subscription.containerRegistryService
79+
// Recovery Services resources in the subscription
80+
recoveryServices() azure.subscription.recoveryServicesService
7981
}
8082

8183
// Azure function
@@ -3011,6 +3013,8 @@ private azure.subscription.monitorService {
30113013
applicationInsights() []azure.subscription.monitorService.applicationInsight
30123014
// Monitor activity log
30133015
activityLog() azure.subscription.monitorService.activityLog
3016+
// Log Analytics workspaces
3017+
workspaces() []azure.subscription.monitorService.workspace
30143018
}
30153019

30163020
// Azure Monitor activity log
@@ -3047,6 +3051,8 @@ private azure.subscription.monitorService.applicationInsight @defaults("name loc
30473051
retentionInDays int
30483052
// Log Analytics workspace resource ID
30493053
workspaceResourceId string
3054+
// Log Analytics workspace (typed reference)
3055+
workspace() azure.subscription.monitorService.workspace
30503056
}
30513057

30523058
// Azure Monitor activity log alert
@@ -4358,3 +4364,257 @@ private azure.subscription.containerRegistryService.registry.token @defaults("id
43584364
// Token certificates
43594365
certificates []dict
43604366
}
4367+
4368+
// Azure Log Analytics workspace
4369+
azure.subscription.monitorService.workspace @defaults("id name location skuName") {
4370+
// Workspace resource ID
4371+
id string
4372+
// Workspace name
4373+
name string
4374+
// Workspace location
4375+
location string
4376+
// Resource type
4377+
type string
4378+
// Workspace tags
4379+
tags map[string]string
4380+
// SKU name ("Free", "Standard", "Premium", "PerNode", "PerGB2018", "Standalone", "CapacityReservation", "LACluster")
4381+
skuName string
4382+
// Capacity reservation level in GB/day (for CapacityReservation SKU)
4383+
skuCapacityReservationLevel int
4384+
// Data retention period in days
4385+
retentionInDays int
4386+
// Public network access for ingestion ("Enabled" or "Disabled")
4387+
publicNetworkAccessForIngestion string
4388+
// Public network access for query ("Enabled" or "Disabled")
4389+
publicNetworkAccessForQuery string
4390+
// Whether customer-managed key is required for query
4391+
forceCmkForQuery bool
4392+
// Workspace creation date
4393+
createdDate time
4394+
// Workspace last modified date
4395+
modifiedDate time
4396+
// Provisioning state
4397+
provisioningState string
4398+
// Workspace GUID
4399+
customerId string
4400+
// Daily data volume capping
4401+
capping() azure.subscription.monitorService.workspace.capping
4402+
// Workspace feature flags
4403+
features() azure.subscription.monitorService.workspace.features
4404+
// Data export rules
4405+
dataExports() []azure.subscription.monitorService.workspace.dataExport
4406+
// Linked services
4407+
linkedServices() []azure.subscription.monitorService.workspace.linkedService
4408+
// Private link scoped resources
4409+
privateLinkScopedResources() []dict
4410+
}
4411+
4412+
// Daily data volume capping for a Log Analytics workspace
4413+
private azure.subscription.monitorService.workspace.capping @defaults("dailyQuotaGb") {
4414+
// Capping identifier
4415+
id string
4416+
// Daily quota in GB (-1 means unlimited)
4417+
dailyQuotaGb float
4418+
// Data ingestion status ("RespectQuota", "ForceOn", "ForceOff", etc.)
4419+
dataIngestionStatus string
4420+
// Next quota reset time
4421+
quotaNextResetTime string
4422+
}
4423+
4424+
// Feature flags for a Log Analytics workspace
4425+
private azure.subscription.monitorService.workspace.features @defaults("disableLocalAuth enableDataExport") {
4426+
// Features identifier
4427+
id string
4428+
// Whether local authentication is disabled
4429+
disableLocalAuth bool
4430+
// Whether data export is enabled
4431+
enableDataExport bool
4432+
// Whether log access uses only resource permissions
4433+
enableLogAccessUsingOnlyResourcePermissions bool
4434+
// Whether data is immediately purged after 30 days
4435+
immediatePurgeDataOn30Days bool
4436+
// Dedicated cluster resource ID
4437+
clusterResourceId string
4438+
}
4439+
4440+
// Data export rule for a Log Analytics workspace
4441+
private azure.subscription.monitorService.workspace.dataExport @defaults("id name enabled") {
4442+
// Data export resource ID
4443+
id string
4444+
// Data export name
4445+
name string
4446+
// Resource type
4447+
type string
4448+
// Whether the export rule is enabled
4449+
enabled bool
4450+
// Table names to export
4451+
tableNames []string
4452+
// Destination resource ID
4453+
destinationResourceId string
4454+
// Creation date
4455+
createdDate time
4456+
// Last modified date
4457+
lastModifiedDate time
4458+
}
4459+
4460+
// Linked service for a Log Analytics workspace
4461+
private azure.subscription.monitorService.workspace.linkedService @defaults("id name") {
4462+
// Linked service resource ID
4463+
id string
4464+
// Linked service name
4465+
name string
4466+
// Resource type
4467+
type string
4468+
// Linked resource ID
4469+
resourceId string
4470+
// Write access resource ID
4471+
writeAccessResourceId string
4472+
// Provisioning state
4473+
provisioningState string
4474+
}
4475+
4476+
// Azure Recovery Services
4477+
private azure.subscription.recoveryServicesService {
4478+
// Subscription identifier
4479+
subscriptionId string
4480+
// List of recovery services vaults
4481+
vaults() []azure.subscription.recoveryServicesService.vault
4482+
}
4483+
4484+
// Azure Recovery Services vault
4485+
azure.subscription.recoveryServicesService.vault @defaults("id name location skuName") {
4486+
// Vault resource ID
4487+
id string
4488+
// Vault name
4489+
name string
4490+
// Vault location
4491+
location string
4492+
// Resource type
4493+
type string
4494+
// Vault tags
4495+
tags map[string]string
4496+
// Identity configuration
4497+
identity dict
4498+
// SKU name ("Standard" or "RS0")
4499+
skuName string
4500+
// Provisioning state
4501+
provisioningState string
4502+
// Public network access ("Enabled" or "Disabled")
4503+
publicNetworkAccess string
4504+
// Backup storage version
4505+
backupStorageVersion string
4506+
// Private endpoint state for backup ("None" or "Enabled")
4507+
privateEndpointStateForBackup string
4508+
// Private endpoint state for site recovery ("None" or "Enabled")
4509+
privateEndpointStateForSiteRecovery string
4510+
// Secure score ("Healthy" or "Unhealthy")
4511+
secureScore string
4512+
// Security settings (soft delete, immutability, enhanced security)
4513+
securitySettings() azure.subscription.recoveryServicesService.vault.securitySettings
4514+
// Encryption settings
4515+
encryption() azure.subscription.recoveryServicesService.vault.encryption
4516+
// Monitoring and alerting settings
4517+
monitoringSettings() azure.subscription.recoveryServicesService.vault.monitoringSettings
4518+
// Storage redundancy settings
4519+
redundancySettings() azure.subscription.recoveryServicesService.vault.redundancySettings
4520+
// Backup vault configuration (from backup API)
4521+
backupConfig() azure.subscription.recoveryServicesService.vault.backupConfig
4522+
// Private endpoint connections
4523+
privateEndpointConnections() []azure.subscription.privateEndpointConnection
4524+
// Backup policies
4525+
backupPolicies() []azure.subscription.recoveryServicesService.vault.backupPolicy
4526+
// Protected (backed-up) items
4527+
protectedItems() []azure.subscription.recoveryServicesService.vault.protectedItem
4528+
}
4529+
4530+
// Security settings for a Recovery Services vault
4531+
private azure.subscription.recoveryServicesService.vault.securitySettings @defaults("softDeleteState immutabilityState") {
4532+
// Security settings identifier
4533+
id string
4534+
// Soft delete state ("Enabled" or "Disabled")
4535+
softDeleteState string
4536+
// Soft delete retention period in days
4537+
softDeleteRetentionPeriodInDays int
4538+
// Enhanced security state ("Enabled" or "Disabled")
4539+
enhancedSecurityState string
4540+
// Immutability state ("Locked" or "Unlocked")
4541+
immutabilityState string
4542+
}
4543+
4544+
// Encryption settings for a Recovery Services vault
4545+
private azure.subscription.recoveryServicesService.vault.encryption @defaults("infrastructureEncryption") {
4546+
// Encryption identifier
4547+
id string
4548+
// Infrastructure encryption state ("Enabled" or "Disabled")
4549+
infrastructureEncryption string
4550+
// Key Vault key URI for CMK encryption
4551+
keyVaultKeyUri string
4552+
// Key Vault key used for encryption
4553+
key() azure.subscription.keyVaultService.key
4554+
}
4555+
4556+
// Monitoring and alerting settings for a Recovery Services vault
4557+
private azure.subscription.recoveryServicesService.vault.monitoringSettings @defaults("alertsForAllJobFailures") {
4558+
// Monitoring settings identifier
4559+
id string
4560+
// Alerts for all failover issues ("Enabled" or "Disabled")
4561+
alertsForAllFailoverIssues string
4562+
// Alerts for all job failures ("Enabled" or "Disabled")
4563+
alertsForAllJobFailures string
4564+
// Alerts for all replication issues ("Enabled" or "Disabled")
4565+
alertsForAllReplicationIssues string
4566+
// Alerts for critical operations ("Enabled" or "Disabled")
4567+
alertsForCriticalOperations string
4568+
// Email notifications for site recovery ("Enabled" or "Disabled")
4569+
emailNotificationsForSiteRecovery string
4570+
}
4571+
4572+
// Storage redundancy settings for a Recovery Services vault
4573+
private azure.subscription.recoveryServicesService.vault.redundancySettings @defaults("storageRedundancy crossRegionRestore") {
4574+
// Redundancy settings identifier
4575+
id string
4576+
// Standard tier storage redundancy ("GeoRedundant" or "LocallyRedundant")
4577+
storageRedundancy string
4578+
// Cross-region restore setting ("Enabled" or "Disabled")
4579+
crossRegionRestore string
4580+
}
4581+
4582+
// Backup vault configuration (soft delete, storage type)
4583+
private azure.subscription.recoveryServicesService.vault.backupConfig @defaults("softDeleteFeatureState storageType") {
4584+
// Backup config identifier
4585+
id string
4586+
// Soft delete feature state ("AlwaysON", "Enabled", or "Disabled")
4587+
softDeleteFeatureState string
4588+
// Soft delete retention period in days
4589+
softDeleteRetentionPeriodInDays int
4590+
// Enhanced security state ("Enabled" or "Disabled")
4591+
enhancedSecurityState string
4592+
// Storage type ("GeoRedundant", "LocallyRedundant", or "ZoneRedundant")
4593+
storageType string
4594+
// Storage type lock state ("Locked" or "Unlocked")
4595+
storageTypeState string
4596+
}
4597+
4598+
// Backup policy in a Recovery Services vault
4599+
private azure.subscription.recoveryServicesService.vault.backupPolicy @defaults("id name") {
4600+
// Backup policy resource ID
4601+
id string
4602+
// Backup policy name
4603+
name string
4604+
// Resource type
4605+
type string
4606+
// Policy properties (polymorphic: IaaS VM, SQL, FileShare, etc.)
4607+
properties dict
4608+
}
4609+
4610+
// Protected (backed-up) item in a Recovery Services vault
4611+
private azure.subscription.recoveryServicesService.vault.protectedItem @defaults("id name") {
4612+
// Protected item resource ID
4613+
id string
4614+
// Protected item name
4615+
name string
4616+
// Resource type
4617+
type string
4618+
// Item properties (polymorphic: VM, SQL, FileShare, SAP HANA, etc.)
4619+
properties dict
4620+
}

0 commit comments

Comments
 (0)