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

The documentation for kusto_cluster is missing documentation for enabling / disabling virtual_network_configuration #27660

Open
1 task done
cosh opened this issue Oct 16, 2024 · 1 comment · May be fixed by #28249
Open
1 task done

Comments

@cosh
Copy link

cosh commented Oct 16, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.

Terraform Version

1.9.7

AzureRM Provider Version

4.5.0

Affected Resource(s)/Data Source(s)

azurerm_kusto_cluster

Terraform Configuration Files

resource "azurerm_resource_group" "example" {
  name     = "my-kusto-cluster-rg"
  location = "West Europe"
}

resource "azurerm_kusto_cluster" "example" {
  name                = "kustocluster"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name

  sku {
    name     = "Standard_D13_v2"
    capacity = 2
  }

  tags = {
    Environment = "Production"
  }

  virtual_network_configuration = {
    State = "Disabled"
  }
}

Debug Output/Panic Output

The doc for 

virtual_network_configuration = {
    State = "Disabled"
  }

is missing

Expected Behaviour

The documentation must be updated with all the config parameters

Actual Behaviour

No response

Steps to Reproduce

No response

Important Factoids

No response

References

No response

@liuwuliuyun
Copy link
Contributor

Hi @cosh, thank you for bringing up this concern. Within the virtual_network_configuration section, it's not possible for users to adjust the State, which is why it's omitted from the documentation. As outlined, if a virtual_network_configuration block is removed from an existing kusto cluster, the State automatically changes to Disabled instead of creating a new resource. This approach is designed to prevent unexpected data loss when a virtual_network_configuration block is deleted.

Some reference code:

if d.HasChange("virtual_network_configuration") {
if v, ok := d.GetOk("virtual_network_configuration"); ok {
if vnetConfig := expandKustoClusterVNET(v.([]interface{})); vnetConfig != nil {
props.VirtualNetworkConfiguration = vnetConfig
}
} else {
// 'State' is hardcoded to 'Disabled' for the 'None' pattern.
// If the vNet block is present it is enabled, if the vNet block is removed it is disabled.
props.VirtualNetworkConfiguration.State = pointer.To(clusters.VnetStateDisabled)
}
}

// 'State' is hardcoded to 'Enabled' for the 'None' pattern.
// If the vNet block is present it is enabled, if the vNet block is removed it is disabled.
SubnetId: subnetID,
EnginePublicIPId: enginePublicIPID,
DataManagementPublicIPId: dataManagementPublicIPID,
State: pointer.To(clusters.VnetStateEnabled),
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants