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

Undocumented breaking change in 4.x with azurerm_kusto_cluster language_extensions #27580

Open
1 task done
Costo opened this issue Oct 7, 2024 · 1 comment
Open
1 task done

Comments

@Costo
Copy link

Costo commented Oct 7, 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.4

AzureRM Provider Version

4.4.0

Affected Resource(s)/Data Source(s)

azurerm_kusto_cluster

Terraform Configuration Files

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

  language_extensions {
      name  = "PYTHON"
      image = "Python3_6_5"
  }

  sku {
    name     = "Standard_D13_v2"
    capacity = 2
  }
}

Debug Output/Panic Output

2024-10-07T21:07:37.3981446Z 2024-10-07T21:07:37.395Z [DEBUG] ReferenceTransformer: "azurerm_kusto_cluster.cluster" references: []
2024-10-07T21:07:37.3982371Z 2024-10-07T21:07:37.396Z [DEBUG] UpgradeResourceState: attribute "engine" no longer present in schema
2024-10-07T21:07:37.3983882Z 2024-10-07T21:07:37.396Z [ERROR] provider.terraform-provider-azurerm_v4.4.0_x5.exe: Response contains error diagnostic: tf_req_id=2486e30f-1f3a-6b21-5d25-96b6b60dc5f6 @caller=github.com/hashicorp/terraform-plugin-go@v0.23.0/tfprotov5/internal/diag/diagnostics.go:58 diagnostic_attribute="AttributeName(\"language_extensions\").ElementKeyInt(0)" diagnostic_detail="" diagnostic_summary="missing expected {" tf_provider_addr=registry.terraform.io/hashicorp/azurerm tf_resource_type=azurerm_kusto_cluster tf_rpc=UpgradeResourceState @module=sdk.proto diagnostic_severity=ERROR tf_proto_version=5.6 timestamp=2024-10-07T21:07:37.396Z
2024-10-07T21:07:37.3984931Z 2024-10-07T21:07:37.397Z [ERROR] vertex "azurerm_kusto_cluster.cluster" error: missing expected {
2024-10-07T21:07:37.3985501Z 2024-10-07T21:07:37.397Z [ERROR] vertex "azurerm_kusto_cluster.cluster (expand)" error: missing expected {

...

╷
│ Error: missing expected {
│ 
│   with azurerm_kusto_cluster.cluster,
│   on kusto.tf line 1, in resource "azurerm_kusto_cluster" "cluster":
│    1: resource "azurerm_kusto_cluster" "cluster" {
│ 
╵
##[error]Error: Terraform Plan failed with exit code: 1

Expected Behaviour

Terraform plan should succeed

Actual Behaviour

Terraform plan fails with error

│ Error: missing expected {
│ 
│   with azurerm_kusto_cluster.cluster,
│   on kusto.tf line 1, in resource "azurerm_kusto_cluster" "cluster":
│    1: resource "azurerm_kusto_cluster" "cluster" {
│ 

Steps to Reproduce

Upgrading from AzureRM 3.61.0 to 4.4.0, the language_extensions block changed from:

language_extensions = ["PYTHON"]

to:

language_extensions {
      name  = "PYTHON"
      image = "Python3_6_5"
}

But this change is incompatible with existing state and terraform plan fails after loading state.

This change was introduced by this PR: #21961
The new block name was supposed to be language_extension singular, but the name remained language_extensions plural.

Important Factoids

No response

References

No response

@liuwuliuyun
Copy link
Contributor

Hi @Costo , thanks for bring this to our attention, I will work on a PR to fix this issue and keep you updated in this thread.

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

No branches or pull requests

3 participants