github Azure/terraform-azurerm-avm-res-operationalinsights-workspace v0.6.0

34 minutes ago

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_name is replaced by a required parent_id, the resource ID of the resource group. In the log_analytics_solution submodule, parent_id replaces log_analytics_solution_resource_group_name.
  • The log_analytics_solution submodule now deploys AVM telemetry, and needs location unless enable_telemetry is 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.

  1. Replace resource_group_name with parent_id. Spell the resource group name exactly as before, including its case, for example by passing the resource group's id. A different spelling plans replacements. Do the same in the log_analytics_solution submodule, and set its location or enable_telemetry = false.
  2. Change a ReadOnly lock to CanNotDelete, or remove it, until the upgrade is applied.
  3. Keep the AzureRM provider block until the upgrade is applied, because Terraform needs it to forget the application security group associations.
  4. Cross-tenant role assignments, which set delegated_managed_identity_resource_id, need a terraform state rm and an import block. See the README.
  5. 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.
  6. Run terraform init -upgrade, then terraform plan. The workspace and the resources around it are updated in place with the same settings. The plan also adds state-only random_uuid, time_sleep and azapi_resource_action.shared_keys resources and, when enable_telemetry is true, the AVM telemetry deployments. The modtm telemetry resources, the application security group associations and the SecuredByPerimeter update are removed from the state without changing Azure. Don't apply a plan that destroys or replaces anything.
  7. Apply the plan, then remove avm_managed_migration_enabled. Later plans report no changes, except that the AVM telemetry deployments update on every plan while enable_telemetry is true.

See Upgrading from 0.5.x or earlier in the README.

Other changes

  • Adds the resource_types, retry, timeouts and ignore_body_changes inputs for every resource, including the submodules', plus lock.notes and role_assignments.name.
  • Private endpoints accept private_endpoints_manage_dns_zone_group, subresource_name and 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 resource output keeps the attribute names of azurerm_log_analytics_workspace, and private_endpoints those of azurerm_private_endpoint. Adds the name output.
  • 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

Other Changes

New Contributors

Full Changelog: v0.5.1...v0.6.0

Don't miss a new terraform-azurerm-avm-res-operationalinsights-workspace release

NewReleases is sending notifications on new releases.