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 Azure Function Default Prewarmed Instances Does Not Match Azure Default #9066

Closed
RiverPhillips opened this issue Oct 28, 2020 · 2 comments · Fixed by #9069
Closed
Labels
Milestone

Comments

@RiverPhillips
Copy link
Contributor

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 (and AzureRM Provider) Version

Terarform Version: 0.13.3
Azurerm Version: Confirmed on 2.28.0 and 2.33.0

Affected Resource(s)

  • azurerm_function_app

Terraform Configuration Files

resource "azurerm_resource_group" "example" {
  name     = "azure-functions-test-rg"
  location = "westus2"
}

resource "azurerm_storage_account" "example" {
  name                     = "functionsapptestsa"
  resource_group_name      = azurerm_resource_group.example.name
  location                 = azurerm_resource_group.example.location
  account_tier             = "Standard"
  account_replication_type = "LRS"
}

resource "azurerm_app_service_plan" "example" {
  name                = "azure-functions-test-service-plan"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name

  sku {
    tier = "ElasticPremium"
    size = "EP1"
  }
}

resource "azurerm_function_app" "example" {
  name                       = "test-azure-functions"
  location                   = azurerm_resource_group.example.location
  resource_group_name        = azurerm_resource_group.example.name
  app_service_plan_id        = azurerm_app_service_plan.example.id
  storage_account_name       = azurerm_storage_account.example.name
  storage_account_access_key = azurerm_storage_account.example.primary_access_key
}

Debug Output

Expected Behavior

Without explicity setting the prewarmed instances I would expect it to default to 1 as detailed by Microsoft here

The default pre-warmed instance count is 1, and for most scenarios should remain as 1.

Actual Behavior

Prewarmed instances set to 0

Steps to Reproduce

  1. terraform apply

Important Factoids

References

  • #0000
@tombuildsstuff tombuildsstuff added this to the v2.41.0 milestone Dec 10, 2020
@jackofallops jackofallops modified the milestones: v2.41.0, v2.42.0 Dec 17, 2020
katbyte pushed a commit that referenced this issue Dec 29, 2020
…se azure's default (#9069)

This resolves #9066 by setting the default prewarmed pre_warmed_instance_count to 1
@ghost
Copy link

ghost commented Jan 8, 2021

This has been released in version 2.42.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.42.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Jan 29, 2021

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Jan 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
3 participants