<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/howto-get-azure-function-key-and-set-it-as-value-of-a-not-managed-key-vault-secret-using-terraform-jkc3tmf0b" -->

---
title: [HOWTO] Get Azure Function key and set it as value of a...
description: A practical guide showing how to retrieve an Azure Function key (function type) and store it as a Key Vault secret value using Terraform's AzAPI provider. The...
canonical: https://daily.dev/posts/howto-get-azure-function-key-and-set-it-as-value-of-a-not-managed-key-vault-secret-using-terraform-jkc3tmf0b
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: [HOWTO] Get Azure Function key and set it as value of a not managed key vault secret using Terraform and AzAPI provider | daily.dev
og:description: A practical guide showing how to retrieve an Azure Function key (function type) and store it as a Key Vault secret value using Terraform's AzAPI provider. The...
og:url: https://daily.dev/posts/howto-get-azure-function-key-and-set-it-as-value-of-a-not-managed-key-vault-secret-using-terraform-jkc3tmf0b
og:image: https://api.daily.dev/og/posts/JKC3tmF0b.png
og:image:alt: [HOWTO] Get Azure Function key and set it as value of a not managed key vault secret using Terraform and AzAPI provider
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# [HOWTO] Get Azure Function key and set it as value of a not managed key vault secret using Terraform and AzAPI provider

**[We Are .NET](https://daily.dev/sources/wearedotnet)** · 1 min read · 0 upvotes · 0 comments

## Summary

A practical guide showing how to retrieve an Azure Function key (function type) and store it as a Key Vault secret value using Terraform's AzAPI provider. The solution uses two `azapi_resource_action` resources: one to call the `listkeys` action on the Azure Function, and another to PUT the retrieved key value into a Key Vault secret that is not managed by Terraform.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.rufer.be/2026/07/08/howto-get-azure-function-key-and-set-it-as-value-of-a-not-managed-key-vault-secret-using-terraform-and-azapi-provider>

## Similar posts on daily.dev

- [How to Manage Secrets Securely with Azure Key Vault in Node.js](https://daily.dev/posts/how-to-manage-secrets-securely-with-azure-key-vault-in-node-js-qg2epr4i5) · freeCodeCamp · 1 upvotes · 0 comments
- [Azure Key Vault for Credentials](https://daily.dev/posts/azure-key-vault-for-credentials-oiz0l4kto) · Couchbase · 0 upvotes · 0 comments
- [How to Encrypt Terraform State Files](https://daily.dev/posts/how-to-encrypt-terraform-state-files-xqueae5zq) · Spacelift · 2 upvotes · 1 comments

---

Tags: [#azure](https://daily.dev/tags/azure), [#terraform](https://daily.dev/tags/terraform), [#iac](https://daily.dev/tags/iac), [#azure-functions](https://daily.dev/tags/azure-functions)

[View this post on daily.dev](https://daily.dev/posts/howto-get-azure-function-key-and-set-it-as-value-of-a-not-managed-key-vault-secret-using-terraform-jkc3tmf0b)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"[HOWTO] Get Azure Function key and set it as value of a not managed key vault secret using Terraform and AzAPI provider","url":"https://daily.dev/posts/howto-get-azure-function-key-and-set-it-as-value-of-a-not-managed-key-vault-secret-using-terraform-jkc3tmf0b","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/howto-get-azure-function-key-and-set-it-as-value-of-a-not-managed-key-vault-secret-using-terraform-jkc3tmf0b"},"datePublished":"2026-07-08T07:22:53.269Z","dateModified":"2026-07-08T07:23:09.147Z","description":"A practical guide showing how to retrieve an Azure Function key (function type) and store it as a Key Vault secret value using Terraform's AzAPI provider. The...","image":"https://media.daily.dev/image/upload/s--ZrL_HSsR--/f_auto/v1722860399/public/Placeholder%2006","thumbnailUrl":"https://media.daily.dev/image/upload/s--ZrL_HSsR--/f_auto/v1722860399/public/Placeholder%2006","isAccessibleForFree":true,"articleSection":"We Are .NET","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"We Are .NET","logo":"https://media.daily.dev/image/upload/s--BsnVOa3i--/f_auto/v1718347410/logos/wearedotnet","url":"https://daily.dev/sources/wearedotnet"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/howto-get-azure-function-key-and-set-it-as-value-of-a-not-managed-key-vault-secret-using-terraform-jkc3tmf0b","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"azure,terraform,iac,azure-functions","timeRequired":"PT1M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"We Are .NET","item":"https://daily.dev/sources/wearedotnet"},{"@type":"ListItem","position":3,"name":"[HOWTO] Get Azure Function key and set it as value of a not managed key vault secret using Terraform and AzAPI provider"}]}
```

