hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.59k stars 4.63k forks source link

Support for ignoring zip packages in Azure Function App #13459

Open brennfoster opened 3 years ago

brennfoster commented 3 years ago

Community Note

Description

When running terraform deployments against a function app, it removes the zip package forcing me to redeploy code after terraform has finished.

I've seen examples of publishing the package as a part of the terraform deployment but I'd rather keep those tasks separated. I only want terraform to update the infrastructure of the app service, not remove any code.

New or Affected Resource(s)

azurerm_function_app

Potential Terraform Configuration

Using WEBSITE_RUN_FROM_PACKAGE = 1

References

I've asked the question in community channel but I don't think we have the ability to do this.

https://discuss.hashicorp.com/t/ignore-zip-package-in-function-app/29753

brennfoster commented 3 years ago

I need a way to tell Terraform ignore this folder: /home/data/SitePackages which is where the zip packages get published to.

dloukola commented 3 years ago

@brennfoster Were you able to resolve this? We are having the same issue.

brennfoster commented 3 years ago

@dloukola I decided to run on Linux which uploads the zip package to blob storage. Then I set an ignore on the appsetting WEBSITE_RUN_FROM_PACKAGE in terraform so that it doesn't overwrite.