How to configure Functions settings/annotations in project.yml

One can secure their Functions via UI Settings -tab: the option Secure Web Function can be enabled. However, when re-deploying the function via doctl, the Secure Web Function (or any other) setting doesn’t persist.

The relating properties are available in the function metadata annotations which can be obtained via cmd doctl serverless functions get demo/test_auth for an already existing function:

  "annotations": [
      "key": "web-export",
      "value": true
      "key": "raw-http",
      "value": false
      "key": "provide-api-key",
      "value": false
      "key": "require-whisk-auth",
      "value": false
      "key": "exec",
      "value": "python:3.9"

How to configure the “Raw HTTP”, “Secure Web Function”, etc., settings in the project.yml, what are the correct field names? I’ve tried the snippet below as my project.yml, with no luck:

  - name: demo
      - name: test_auth
          require-whisk-auth: true
          raw-http: true
        runtime: 'python:default'
          timeout: 12000
          memory: 128

Thanks in advance!

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

I have the same question. I am also not able to find all config properties in the documentation.