Reputation: 93
I am trying to create the function keys using terraform
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Web/sites/functions/keys@2022-09-01"
name = "Random"
parent_id = "/subscriptions/xxxxxxxxxxxxxxxxxxxxx/resourceGroups/xxxxxxx/providers/Microsoft.Web/sites/fa-test-fucntions/functions/testcreatkey"
body = jsonencode({
value = "hhundredslkkjjsiiskkk"
})
}
but getting below error,
--------------------------------------------------------------------------------
│ RESPONSE 400: 400 Bad Request
│ ERROR CODE UNAVAILABLE
│ --------------------------------------------------------------------------------
│ {
│ "Code": "BadRequest",
│ "Message": "Properties object is not present in the request body.",
│ "Target": null,
│ "Details": [
│ {
│ "Message": "Properties object is not present in the request body."
│ },
│ {
│ "Code": "BadRequest"
│ },
│ {
│ "ErrorEntity": {
│ "ExtendedCode": "51006",
│ "MessageTemplate": "{0} object is not present in the request body.",
│ "Parameters": [
│ "Properties"
│ ],
│ "Code": "BadRequest",
│ "Message": "Properties object is not present in the request body."
│ }
│ }
│ ],
│ "Innererror": null
│ }
Basically I wanted to save fucntion keys using terraform into KV secret, So I thought of trying to create the keys and then storing the value in KV
Any help, appreciated
Upvotes: 0
Views: 348