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 terraform-provider-azurerm_v3.92.0_x5 plugin crashed #24957

Closed
1 task done
sk0289 opened this issue Feb 21, 2024 · 3 comments · Fixed by #24981
Closed
1 task done

The terraform-provider-azurerm_v3.92.0_x5 plugin crashed #24957

sk0289 opened this issue Feb 21, 2024 · 3 comments · Fixed by #24981

Comments

@sk0289
Copy link

sk0289 commented Feb 21, 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 "+1" or "me too" comments, 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.7.3

AzureRM Provider Version

3.92.0

Affected Resource(s)/Data Source(s)

postgresql_flexible_server

Terraform Configuration Files

resource "azurerm_postgresql_flexible_server" "psql-flex" {
  name                   = "psql-tst
  resource_group_name    = var.rgname
  location               = var.location
  version                = var.version_psql
  delegated_subnet_id    = var.subnet_id
  private_dns_zone_id    = var.private_dns_zone_id
  administrator_login    = var.admin_login
  administrator_password = var.admin_login_pwd == null ? random_password.main.0.result : var.admin_login_pwd

  storage_mb             = var.storage_mb
  sku_name               = var.sku_name
  depends_on             = [var.dependent_module]
  authentication {
    active_directory_auth_enabled = true
    tenant_id                     = data.azurerm_client_config.current.tenant_id
  }  
  identity {
    type         = var.psql_server_identity
    identity_ids = var.identity_ids
  }
  customer_managed_key {
    key_vault_key_id                         = var.tde_kv_key_id
    primary_user_assigned_identity_id        = var.primary_user_assigned_identity_id
  }
  lifecycle {
    ignore_changes = [
      zone,
      administrator_password,
    ]
  } 

}

Debug Output/Panic Output

Stack trace from the terraform-provider-azurerm_v3.92.0_x5 plugin:

panic: interface conversion: interface {} is nil, not map[string]interface {}

goroutine 115 [running]:
github.com/hashicorp/terraform-provider-azurerm/internal/services/postgres.expandFlexibleServerDataEncryption({0xc005b98e70?, 0x89ff6b7?, 0xc000dcb420?})
	github.com/hashicorp/terraform-provider-azurerm/internal/services/postgres/postgresql_flexible_server_resource.go:1097 +0x385
github.com/hashicorp/terraform-provider-azurerm/internal/services/postgres.resourcePostgresqlFlexibleServerCreate(0x0?, {0x7a33fa0?, 0xc00171f680?})
	github.com/hashicorp/terraform-provider-azurerm/internal/services/postgres/postgresql_flexible_server_resource.go:441 +0xb6f
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x9233420?, {0x9233420?, 0xc005b830b0?}, 0xd?, {0x7a33fa0?, 0xc00171f680?})
	github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:766 +0x163
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc001a75420, {0x9233420, 0xc005b830b0}, 0xc0015dd5f0, 0xc005904980, {0x7a33fa0, 0xc00171f680})
	github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:909 +0xa89
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc00055d080, {0x9233420?, 0xc005b82fc0?}, 0xc001bb3770)
	github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:1060 +0xdbc
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc0010fdf40, {0x9233420?, 0xc005993e30?}, 0xc000dcac40)
	github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:859 +0x56b
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x85fff80?, 0xc0010fdf40}, {0x9233420, 0xc005993e30}, 0xc000dcabd0, 0x0)
	github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:467 +0x169
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0002ce1e0, {0x925a200, 0xc001a8e680}, 0xc00189ed80, 0xc0016c77a0, 0xec0be98, 0x0)
	google.golang.org/[email protected]/server.go:1374 +0xde7
google.golang.org/grpc.(*Server).handleStream(0xc0002ce1e0, {0x925a200, 0xc001a8e680}, 0xc00189ed80, 0x0)
	google.golang.org/[email protected]/server.go:1751 +0x9e7
google.golang.org/grpc.(*Server).serveStreams.func1.1()
	google.golang.org/[email protected]/server.go:986 +0xbb
created by google.golang.org/grpc.(*Server).serveStreams.func1 in goroutine 52
	google.golang.org/[email protected]/server.go:997 +0x145

Error: The terraform-provider-azurerm_v3.92.0_x5 plugin crashed!

Expected Behaviour

No response

Actual Behaviour

No response

Steps to Reproduce

No response

Important Factoids

No response

References

No response

@sk0289
Copy link
Author

sk0289 commented Feb 21, 2024

The plugin crashes whenever null value is supplied to the parameter primary_user_assigned_identity_id

@neil-yechenwei
Copy link
Contributor

Thanks for raising this issue. It just happens when the empty block "customer_managed_key {}" is specified. Suggest to not set it when it doesn't need. Thanks.

Copy link

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 Apr 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants