-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Resource for zip deployment of function app #1376
Comments
Richard, Were you able to figure out a deployment method for your Azure Function App? I would give this a try: resource "azurerm_function_app" "lambda_app" {
...
app_settings = ...
"WEBSITE_RUN_FROM_ZIP" = "${format("%s.azurewebsites.net/%s", var.fn_app_name, var.blob_url_sas)}"
} Hope that helps. |
I figured it out yes and I was using the exact snippet you posted so thanks. I still think it is a bit unintuitive though. |
Using a URL works, but unfortunately is not recommended by Microsoft:
|
Correct me if I'm wrong, but (as a complete AzureFunctions newbie) my understanding is that 'Run From Package' and 'Zip Deployment' are not the same thing:
What this GH issue asks for (I think) is a Terraform feature for zip deployment of Functions so that remote build remains available. |
After internal discussion with hashicorp maintainers, we would hold on this work until the next major release 3.0. The app service resource will have a large refactoring |
@tombuildsstuff @njuCZ Now that v3.x of azurerm has been out for some time, I would like to re-raise this issue. Currently to do a ZIP Deploy for an Azure function, it either must be done with the az CLI or with the REST API. I am proposing a new resource parameter to support this natively. For example:
Please note this as well:
|
It looks like support for ZIP deploy is going to get released in v3.5.0 👍 |
Hi @mybayern1974 / @rcskosir , Could this be closed as it seemed to be supported from v.3.50.0? |
@harshavmb Thanks for bringing this to my attention. It looks like this has been resolved as of #20544. As such, I am going to mark this issue as closed. If that is not the case, please provide additional information including the version in which you are still experiencing this issue, thanks! |
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. |
Community Note
Description
It would be awesome if the azure provider would have a resource for the zip deployment described here:
https://docs.microsoft.com/en-us/azure/azure-functions/deployment-zip-push
At the moment the only way to push a zip file to a function app is to use the
az
tool directly. Blob would not work because, if I understand things correctly - and I am a newbie here - theWEBSITE_RUN_FROM_ZIP
that eventually contains the link to the zip has to reference the hostname of the function app, which is a self-reference. At least this is what I tried and it is not working:It doesn't have to be a resource..or if there is a workaround I would love to know it 😄
New or Affected Resource(s)
References
azurerm_function_app_slot
#1307 (?)The text was updated successfully, but these errors were encountered: