This release moves the workspace and the resources around it, including the query_packs and log_analytics_solution submodules, from the AzureRM provider to AzAPI, so the module no longer requires AzureRM (#153). It requires Terraform 1.16 or later and the hashicorp/time provider (~> 0.13). moved blocks adopt existing deployments in place.
Breaking changes
resource_group_nameis replaced by a requiredparent_id, the resource ID of the resource group. In thelog_analytics_solutionsubmodule,parent_idreplaceslog_analytics_solution_resource_group_name.- The
log_analytics_solutionsubmodule now deploys AVM telemetry, and needslocationunlessenable_telemetryis false.
Upgrading from 0.5.x
An upgrade from 0.5.1 was tested against real Azure with private endpoints, a Monitor Private Link Scope, linked storage, locks, role assignments, a query pack and a solution. Nothing was destroyed or replaced, resources that use workspace_id or the shared keys were unchanged, and the Azure resources kept their settings.
- Replace
resource_group_namewithparent_id. Spell the resource group name exactly as before, including its case, for example by passing the resource group'sid. A different spelling plans replacements. Do the same in thelog_analytics_solutionsubmodule, and set itslocationorenable_telemetry = false. - Change a
ReadOnlylock toCanNotDelete, or remove it, until the upgrade is applied. - Keep the AzureRM
providerblock until the upgrade is applied, because Terraform needs it to forget the application security group associations. - Cross-tenant role assignments, which set
delegated_managed_identity_resource_id, need aterraform state rmand animportblock. See the README. - Set
avm_managed_migration_enabled = true. The module then reads the shared keys during plan, so resources that use them don't change, and imports the private DNS zone groups, which are now separate resources. - Run
terraform init -upgrade, thenterraform plan. The workspace and the resources around it are updated in place with the same settings. The plan also adds state-onlyrandom_uuid,time_sleepandazapi_resource_action.shared_keysresources and, whenenable_telemetryis true, the AVM telemetry deployments. Themodtmtelemetry resources, the application security group associations and theSecuredByPerimeterupdate are removed from the state without changing Azure. Don't apply a plan that destroys or replaces anything. - Apply the plan, then remove
avm_managed_migration_enabled. Later plans report no changes, except that the AVM telemetry deployments update on every plan whileenable_telemetryis true.
See Upgrading from 0.5.x or earlier in the README.
Other changes
- Adds the
resource_types,retry,timeoutsandignore_body_changesinputs for every resource, including the submodules', pluslock.notesandrole_assignments.name. - Private endpoints accept
private_endpoints_manage_dns_zone_group,subresource_nameand IP configuration member names, and now create the role assignments and locks that 0.5.x accepted but ignored (#198). - Network security perimeter associations and the dedicated cluster's linked service get the module's
tags(#198). - The
resourceoutput keeps the attribute names ofazurerm_log_analytics_workspace, andprivate_endpointsthose ofazurerm_private_endpoint. Adds thenameoutput. - Role names are matched, ignoring case, against the role definitions that can be assigned in the resource group, and an unknown name fails during plan.
- Changing the SKU updates the workspace in place instead of replacing it.
- Waits 30 seconds after deleting a lock before deleting the resources it protects, because Azure keeps enforcing a deleted lock for a few seconds.
- The examples use AzAPI.
Behaviour change
The shared keys are read when the workspace is created, not on every refresh, because a ReadOnly lock blocks reading them. To pick up keys regenerated outside Terraform, run terraform apply -replace='module.<module-name>.azapi_resource_action.shared_keys'.
Linking a dedicated cluster with log_analytics_workspace_dedicated_cluster_resource_id hasn't been tested with a real cluster.
What's Changed
Features
- feat!: migrate the Log Analytics workspace to AzAPI by @thomascoats in #211
Other Changes
- feat(metadata): add approved module metadata by @jaredfholgate in #191
- fix: propagate NSP tags and preserve canonical endpoint compatibility by @jaredfholgate in #198
New Contributors
- @jaredfholgate made their first contribution in #191
- @thomascoats made their first contribution in #211
Full Changelog: v0.5.1...v0.6.0