[AZINTS] fix forwarder v4 model upgrade#938
Merged
Merged
Conversation
df7d089 to
9951913
Compare
mattsp1290
approved these changes
May 12, 2025
agulen
approved these changes
May 12, 2025
f1d67f8 to
706d510
Compare
Datadog Summary✅ Code Quality ✅ Code Security ✅ Dependencies Was this helpful? Give us feedback! |
ava-silver
commented
May 13, 2025
Comment on lines
+165
to
+210
| { | ||
| "type": "Microsoft.ManagedIdentity/userAssignedIdentities", | ||
| "apiVersion": "2023-01-31", | ||
| "name": "[concat('syncFunctionTriggers-', parameters('functionAppName'), '-identity')]", | ||
| "location": "[parameters('location')]" | ||
| }, | ||
| { | ||
| "type": "Microsoft.Authorization/roleAssignments", | ||
| "apiVersion": "2022-04-01", | ||
| "name": "[guid('syncFunctionTriggers-', parameters('functionAppName'))]", | ||
| "properties": { | ||
| "roleDefinitionId": "[resourceId('Microsoft.Authorization/roleDefinitions', 'de139f84-1756-47ae-9be6-808fbbe84772')]", | ||
| "principalId": "[reference(resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', concat('syncFunctionTriggers-', parameters('functionAppName'), '-identity')), '2023-01-31').principalId]", | ||
| "principalType": "ServicePrincipal" | ||
| }, | ||
| "dependsOn": [ | ||
| "[resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', concat('syncFunctionTriggers-', parameters('functionAppName'), '-identity'))]" | ||
| ] | ||
| }, | ||
| { | ||
| "type": "Microsoft.Resources/deploymentScripts", | ||
| "apiVersion": "2023-08-01", | ||
| "name": "[concat('syncFunctionTriggers-', parameters('functionAppName'))]", | ||
| "location": "[parameters('location')]", | ||
| "kind": "AzureCLI", | ||
| "identity": { | ||
| "type": "UserAssigned", | ||
| "userAssignedIdentities": { | ||
| "[resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', concat('syncFunctionTriggers-', parameters('functionAppName'), '-identity'))]": {} | ||
| } | ||
| }, | ||
| "properties": { | ||
| "azCliVersion": "2.67.0", | ||
| "scriptContent": "[format('az rest --url ''https://management.azure.com{0}/syncfunctiontriggers?api-version=2024-04-01'' --method post', resourceId('Microsoft.Web/sites', parameters('functionAppName')))]", | ||
| "timeout": "PT30M", | ||
| "cleanupPreference": "OnSuccess", | ||
| "retentionInterval": "P1D", | ||
| "storageAccountSettings": { | ||
| "storageAccountName": "[variables('storageAccountName')]", | ||
| "storageAccountKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2019-06-01').keys[0].value]" | ||
| } | ||
| }, | ||
| "dependsOn": [ | ||
| "[resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', concat('syncFunctionTriggers-', parameters('functionAppName'), '-identity'))]", | ||
| "[resourceId('Microsoft.Web/sites/extensions', parameters('functionAppName'), 'zipdeploy')]" | ||
| ] |
Contributor
Author
There was a problem hiding this comment.
all this just to sync function triggers :cry_cat:
mattsp1290
reviewed
May 13, 2025
| }, | ||
| "properties": { | ||
| "azCliVersion": "2.67.0", | ||
| "scriptContent": "[format('az rest --url ''https://management.azure.com{0}/syncfunctiontriggers?api-version=2024-04-01'' --method post', resourceId('Microsoft.Web/sites', parameters('functionAppName')))]", |
Member
There was a problem hiding this comment.
does this mean we'd lose support for azure gov? (we can always follow up on that if needed)
Contributor
Author
There was a problem hiding this comment.
updated to not hard code 🫡
mattsp1290
approved these changes
May 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What does this PR do?
In the upgrade, I added this setting which the docs said should improve performance (while disallowing portal editing, which was already not working since using v4 breaks this). Instead, it seems to have broken the initial deployment, which slipped through the cracks when testing. This reverts that change to restore the ARM template functionality.
Motivation
Testing Guidelines
Replace the variable in the parent template with:
And run
az deployment group create --resource-group your-resource-group --template-file azure/eventhub_log_forwarder/parent_template.json --parameters apiKey=$DD_API_KEYvalidated from a fresh deploy:
az deployment group create --resource-group ava-test-3 --template-file azure/eventhub_log_forwarder/parent_template.json --parameters apiKey=$DD_API_KEY datadogTags=ava:trueAdded a diagnostic setting on a loggy instance to point to the eventhub, spammed logs, and observed logs coming in:

Additional Notes
Types of changes
Check all that apply