Skip to content

Commit

Permalink
Fixed optional properties
Browse files Browse the repository at this point in the history
  • Loading branch information
krbar committed Aug 30, 2024
1 parent 782450b commit 689f8fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions avm/res/insights/data-collection-rule/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ resource dataCollectionRule 'Microsoft.Insights/dataCollectionRules@2023-03-11'
dataSources: dataCollectionRuleProperties.dataSources
dataFlows: dataCollectionRuleProperties.dataFlows
destinations: dataCollectionRuleProperties.destinations
dataCollectionEndpointId: dataCollectionRuleProperties.dataCollectionEndpointId
streamDeclarations: dataCollectionRuleProperties.streamDeclarations
dataCollectionEndpointId: dataCollectionRuleProperties.?dataCollectionEndpointId
streamDeclarations: dataCollectionRuleProperties.?streamDeclarations
}
: {},
dataCollectionRuleProperties.kind == 'AgentSettings'
Expand All @@ -96,7 +96,7 @@ resource dataCollectionRule 'Microsoft.Insights/dataCollectionRules@2023-03-11'
}
: {},
{
description: dataCollectionRuleProperties.description
description: dataCollectionRuleProperties.?description
}
)
}
Expand Down
4 changes: 2 additions & 2 deletions avm/res/insights/data-collection-rule/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"_generator": {
"name": "bicep",
"version": "0.29.47.4906",
"templateHash": "18086407482545174237"
"templateHash": "16127257398169774892"
},
"name": "Data Collection Rules",
"description": "This module deploys a Data Collection Rule.",
Expand Down Expand Up @@ -388,7 +388,7 @@
"kind": "[parameters('dataCollectionRuleProperties').kind]",
"location": "[parameters('location')]",
"tags": "[parameters('tags')]",
"properties": "[union(if(or(equals(parameters('dataCollectionRuleProperties').kind, 'Linux'), equals(parameters('dataCollectionRuleProperties').kind, 'Windows')), createObject('dataSources', parameters('dataCollectionRuleProperties').dataSources, 'dataFlows', parameters('dataCollectionRuleProperties').dataFlows, 'destinations', parameters('dataCollectionRuleProperties').destinations, 'dataCollectionEndpointId', parameters('dataCollectionRuleProperties').dataCollectionEndpointId, 'streamDeclarations', parameters('dataCollectionRuleProperties').streamDeclarations), createObject()), if(equals(parameters('dataCollectionRuleProperties').kind, 'AgentSettings'), createObject('agentSettings', parameters('dataCollectionRuleProperties').agentSettings), createObject()), createObject('description', parameters('dataCollectionRuleProperties').description))]"
"properties": "[union(if(or(equals(parameters('dataCollectionRuleProperties').kind, 'Linux'), equals(parameters('dataCollectionRuleProperties').kind, 'Windows')), createObject('dataSources', parameters('dataCollectionRuleProperties').dataSources, 'dataFlows', parameters('dataCollectionRuleProperties').dataFlows, 'destinations', parameters('dataCollectionRuleProperties').destinations, 'dataCollectionEndpointId', tryGet(parameters('dataCollectionRuleProperties'), 'dataCollectionEndpointId'), 'streamDeclarations', tryGet(parameters('dataCollectionRuleProperties'), 'streamDeclarations')), createObject()), if(equals(parameters('dataCollectionRuleProperties').kind, 'AgentSettings'), createObject('agentSettings', parameters('dataCollectionRuleProperties').agentSettings), createObject()), createObject('description', tryGet(parameters('dataCollectionRuleProperties'), 'description')))]"
},
"dataCollectionRule_lock": {
"condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
Expand Down

0 comments on commit 689f8fb

Please sign in to comment.