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

Terraform-provider-azurerm_v3.51.0_x5 plugin crashed #21375

Closed
1 task done
pporee opened this issue Apr 11, 2023 · 1 comment · Fixed by #21381
Closed
1 task done

Terraform-provider-azurerm_v3.51.0_x5 plugin crashed #21375

pporee opened this issue Apr 11, 2023 · 1 comment · Fixed by #21381

Comments

@pporee
Copy link

pporee commented Apr 11, 2023

Is there an existing issue for this?

Following #21272 and #21137

  • 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

Terraform Version

1.3.3

AzureRM Provider Version

3.51.0

Affected Resource(s)/Data Source(s)

azurerm_windows_function_app

Terraform Configuration Files

resource "azurerm_windows_function_app" "function" {
  name                        = "xxx-${var.environment}-xxx"
  location                    = azurerm_resource_group.certificates_resource_group.location
  resource_group_name         = azurerm_resource_group.certificates_resource_group.name
  service_plan_id             = azurerm_service_plan.serverfarm.id
  storage_account_name        = azurerm_storage_account.storage.name
  storage_account_access_key  = azurerm_storage_account.storage.primary_access_key
  functions_extension_version = "~4"
  https_only                  = true

  app_settings = {
    "MICROSOFT_PROVIDER_AUTHENTICATION_SECRET" = var.microsoft_provider_auth_secret
    "WEBSITE_RUN_FROM_PACKAGE"                 = "https://stacmebotprod.blob.core.windows.net/keyvault-acmebot/v4/4.0.1.zip"
    "WEBSITE_TIME_ZONE"                        = "UTC"
    "Acmebot:Endpoint"                         = "https://acme-v02.api.letsencrypt.org/"
    "Acmebot:Environment"                      = "AzureCloud"
    "Acmebot:MitigateChainOrder"               = false
    "Acmebot:VaultBaseUrl"                     = azurerm_key_vault.certificates.vault_uri
    "Acmebot:AzureDns:SubscriptionId"          = data.azurerm_client_config.current.subscription_id
    "Acmebot:RenewBeforeExpiry"                = "31"
  }

  auth_settings_v2 {
    auth_enabled           = true
    default_provider       = "AzureActiveDirectory"
    unauthenticated_action = "RedirectToLoginPage"
    require_authentication = true

    active_directory_v2 {
      client_id                  = data.azuread_application.acme.application_id
      tenant_auth_endpoint       = "https://login.microsoftonline.com/v2.0/${data.azurerm_client_config.current.tenant_id}/"
      allowed_audiences          = ["api://${data.azuread_application.acme.application_id}"]
      client_secret_setting_name = "MICROSOFT_PROVIDER_AUTHENTICATION_SECRET"
      allowed_groups             = [data.azuread_group.infra_platform.object_id]
    }
    login {
      token_store_enabled          = true
      token_refresh_extension_time = 24
    }
  }

Debug Output/Panic Output

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

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x49cdf3b]

goroutine 264 [running]:
github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/helpers.expandAadAuthV2Settings({0xc0017eb960, 0x1, 0x0?})
github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/helpers/auth_v2_schema.go:981 +0x55b
github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/helpers.ExpandAuthV2Settings({0xc0006b3520, 0x1, 0x761da40?})
github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/helpers/auth_v2_schema.go:2062 +0x12a
github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice.WindowsFunctionAppResource.Update.func1({0x762b188, 0xc000638c00}, {0xc000681400, {0x762bcb0, 0xc0002b8db0}, 0xc00016ed80, 0x0, {0x762d0d0, 0xbbcdbe8}})
github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/windows_function_app_resource.go:1032 +0x25c7
github.com/hashicorp/terraform-provider-azurerm/internal/sdk.(*ResourceWrapper).Resource.func7({0x762b188, 0xc000638c00}, 0x1a3185c429a?, {0x61d4be0?, 0xc000681400?})
github.com/hashicorp/terraform-provider-azurerm/internal/sdk/wrapper_resource.go:116 +0x15c
github.com/hashicorp/terraform-provider-azurerm/internal/sdk.diagnosticsWrapper.func1({0x762b188, 0xc000638c00}, 0x0?, {0x61d4be0, 0xc000681400})
github.com/hashicorp/terraform-provider-azurerm/internal/sdk/wrapper_resource.go:185 +0xbe
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).update(0xc0007010a0, {0x762b1c0, 0xc00233d980}, 0xd?, {0x61d4be0, 0xc000681400})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.24.1/helper/schema/resource.go:741 +0x12e
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc0007010a0, {0x762b1c0, 0xc00233d980}, 0xc001548410, 0xc0023b8c80, {0x61d4be0, 0xc000681400})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.24.1/helper/schema/resource.go:847 +0x83a
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc000010b10, {0x762b1c0?, 0xc00233d860?}, 0xc001ee39f0)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.24.1/helper/schema/grpc_provider.go:1021 +0xe8d
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc0011f0c80, {0x762b1c0?, 0xc00233d050?}, 0xc002318ee0)
github.com/hashicorp/terraform-plugin-go@v0.14.3/tfprotov5/tf5server/server.go:818 +0x574
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x69311c0?, 0xc0011f0c80}, {0x762b1c0, 0xc00233d050}, 0xc002318e70, 0x0)
github.com/hashicorp/terraform-plugin-go@v0.14.3/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:385 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0004d4000, {0x763b6e0, 0xc001846680}, 0xc00234c240, 0xc0015eea50, 0xbb8d320, 0x0)
google.golang.org/grpc@v1.51.0/server.go:1340 +0xd23
google.golang.org/grpc.(*Server).handleStream(0xc0004d4000, {0x763b6e0, 0xc001846680}, 0xc00234c240, 0x0)
google.golang.org/grpc@v1.51.0/server.go:1713 +0xa2f
google.golang.org/grpc.(*Server).serveStreams.func1.2()
google.golang.org/grpc@v1.51.0/server.go:965 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
google.golang.org/grpc@v1.51.0/server.go:963 +0x28a

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

This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.

Expected Behaviour

No response

Actual Behaviour

No response

Steps to Reproduce

No response

Important Factoids

No response

References

No response

@pporee pporee added the bug label Apr 11, 2023
@github-actions github-actions bot added the crash label Apr 11, 2023
aristosvo pushed a commit to aristosvo/terraform-provider-azurerm that referenced this issue Apr 11, 2023
aristosvo pushed a commit to aristosvo/terraform-provider-azurerm that referenced this issue Apr 11, 2023
@github-actions github-actions bot added this to the v3.52.0 milestone Apr 12, 2023
@github-actions
Copy link

This functionality has been released in v3.52.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

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