Ignore zip package in Function App

I would like to know if there is a way to ignore the zip packages in a Function App during deployments. Currently, it removes that package during Terraform deployments forcing me to redeploy the zip package to the Function App.

I have seen examples of others publishing the zip package after running a Terraform deployment but I would like to keep those things separate. What I’m looking for here is a way to stop removing the zip packages during Terraform deployments.

Hi! It’s easiest to configure the specific setting with ignore_changes. In case of other changes it might still be overwritten, but at least it will not trigger it itself.

For more specific advice I would need more information, but this should be a good starting point.

The problem is I don’t know how to tell it to ignore existing functions on the function app. I’m deploying using a zip package with app setting “WEBSITE_RUN_FROM_PACKAGE = 1” to faster warm ups. Can I point to a specific folder in the function app where the functions are located?

“Only attributes defined by the resource type can be ignored. ignore_changes cannot be applied to itself or to any other meta-arguments.”

It doesn’t look like that command can solve my problem.

Can you give a sanitized version of your plan in which it is clear which settings are being reset?

It doesn’t show up on the plan at all. That is, it doesn’t show that it is deleting the zip package/functions in the plan.

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

@brennfoster have you been able to resolve this issue? Same thing is happening to us.