Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing 'virtual_network_configuration' block from 'azurerm_kusto_cluster' forcing the resource to be replaced #36142

Closed
ben1994mc opened this issue Dec 2, 2024 · 2 comments
Labels

Comments

@ben1994mc
Copy link

Terraform Version

Terraform v1.9.8

Terraform Configuration Files

terraform {

  required_version = ">= 1.9"

 

  required_providers {

    azurerm = {

      source  = "hashicorp/azurerm"

      version = "~> 4.3"

    }

  }
}

Debug Output

# module.kusto_cluster.azurerm_kusto_cluster.main must be replaced

-/+ resource "azurerm_kusto_cluster" "main" {

      - allowed_fqdns                      = [] -> null

      - allowed_ip_ranges                  = [] -> null

      ~ auto_stop_enabled                  = false -> true

      ~ data_ingestion_uri                 = "https://ingest-uri.location.kusto.windows.net/" -> (known after apply)

      - double_encryption_enabled          = false -> null

      ~ id                                 = "/subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.Kusto/clusters/<cluster_namw>" -> (known after apply)

        name                               = "<cluster_name>"

      ~ tags                               = {

            "ApplicationName"   = "<application_name>"

            "DeployableName"    = "<deployable_name>"

          ~ "DeployableVersion" = "6.0.13-unstable" -> "6.0.15-unstable"

            "Environment"       = "<env>"

            "ProjectCode"       = "<project_code>"

        }

      ~ trusted_external_tenants           = [] -> (known after apply)

      ~ uri                                = "https://uri.location.kusto.windows.net/" -> (known after apply)

        # (9 unchanged attributes hidden)

 

      - virtual_network_configuration {

          - data_management_public_ip_id = "/subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.Network/publicIPAddresses/data-pip" -> null # forces replacement

          - engine_public_ip_id          = "/subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.Network/publicIPAddresses/engine-pip" -> null # forces replacement

          - subnet_id                    = "/subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.Network/virtualNetworks/main-vnet/subnets/subnet" -> null # forces replacement

        }

 

        # (1 unchanged block hidden)

    }

Expected Behavior

The documentation suggests that removing the virtual_network_configuration block from the aurerm_kusto_cluster resource definition will set virtual network injection to a disabled state by default which appears to be happening. It also suggests that it shouldn't force the resource to be replaced if the state is being switched from enabled to disabled

Actual Behavior

Removing the virtual_network_configuration block from the aurerm_kusto_cluster resource definition and changing the state of virtual network injection from enabled to disabled is causing the Kusto cluster resource to be replaced.

Steps to Reproduce

  1. Deploy azurerm_kusto_cluster resource with virtual_network_configuration block defined
  2. Remove virtual_network_configuration block
  3. Run terraform plan

Additional Context

Azure will no longer provide support for virtual network injection on Azure Data Explorer clusters from February 2025 so it is necessary to migrate to a private endpoint configuration see here.

This is a prerequisite step for the migration and we cannot allow our existing cluster to be destroyed in the process.

References

No response

@ben1994mc ben1994mc added bug new new issue not yet triaged labels Dec 2, 2024
@jbardin
Copy link
Member

jbardin commented Dec 2, 2024

Hello,

This appears to be an issue or question with the AzureRM provider, not with Terraform itself. You can see existing issues and file a new one in their repository here: https://github.com/terraform-providers/terraform-provider-azurerm/issues. If you have questions about Terraform or the AzureRM provider, it's better to use the community forum where there are more people ready to help. The GitHub issues here are monitored only by a few core maintainers.

Thanks!

@jbardin jbardin closed this as not planned Won't fix, can't repro, duplicate, stale Dec 2, 2024
Copy link
Contributor

github-actions bot commented Jan 2, 2025

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants