Skip to content

Commit

Permalink
[Modules] logic apps default values#784 (#1774)
Browse files Browse the repository at this point in the history
* commit

* commit

* commit

* commit

* Update readme.md

* Update modules/Microsoft.Logic/workflows/deploy.bicep

Co-authored-by: Alexander Sehr <ASehr@hotmail.de>

* Update modules/Microsoft.Logic/workflows/readme.md

Co-authored-by: Alexander Sehr <ASehr@hotmail.de>

* Update modules/Microsoft.Logic/workflows/deploy.bicep

Co-authored-by: Alexander Sehr <ASehr@hotmail.de>

* Update modules/Microsoft.Logic/workflows/deploy.bicep

Co-authored-by: Alexander Sehr <ASehr@hotmail.de>

Co-authored-by: Alexander Sehr <ASehr@hotmail.de>
  • Loading branch information
prasanjeets and AlexanderSehr authored Aug 26, 2022
1 parent 477f0f7 commit f98c0be
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 148 deletions.
9 changes: 6 additions & 3 deletions modules/Microsoft.Logic/workflows/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ param userAssignedIdentities object = {}
@description('Optional. The integration account.')
param integrationAccount object = {}

@description('Optional. The integration service environment.')
param integrationServiceEnvironment object = {}
@description('Optional. The integration service environment Id.')
param integrationServiceEnvironmentResourceId string = ''

@description('Optional. Location for all resources.')
param location string = resourceGroup().location
Expand Down Expand Up @@ -172,7 +172,10 @@ resource logicApp 'Microsoft.Logic/workflows@2019-05-01' = {
workflowManagement: !empty(workflowManagementAccessControlConfiguration) ? workflowManagementAccessControlConfiguration : null
}
integrationAccount: !empty(integrationAccount) ? integrationAccount : null
integrationServiceEnvironment: !empty(integrationServiceEnvironment) ? integrationServiceEnvironment : null
integrationServiceEnvironment: !empty(integrationServiceEnvironmentResourceId) ? {
id: integrationServiceEnvironmentResourceId
} : null

definition: {
'$schema': 'https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#'
actions: workflowActions
Expand Down
185 changes: 40 additions & 145 deletions modules/Microsoft.Logic/workflows/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,37 +29,36 @@ This module deploys a Logic App resource.
**Optional parameters**
| Parameter Name | Type | Default Value | Allowed Values | Description |
| :-- | :-- | :-- | :-- | :-- |
| `actionsAccessControlConfiguration` | object | `{object}` | | The access control configuration for workflow actions. |
| `connectorEndpointsConfiguration` | object | `{object}` | | The endpoints configuration: Access endpoint and outgoing IP addresses for the connector. |
| `contentsAccessControlConfiguration` | object | `{object}` | | The access control configuration for accessing workflow run contents. |
| `definitionParameters` | object | `{object}` | | Parameters for the definition template. |
| `diagnosticEventHubAuthorizationRuleId` | string | `''` | | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
| `diagnosticEventHubName` | string | `''` | | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. |
| `actionsAccessControlConfiguration` | object | `{object}` | | The access control configuration for workflow actions. |
| `connectorEndpointsConfiguration` | object | `{object}` | | The endpoints configuration: Access endpoint and outgoing IP addresses for the connector. |
| `contentsAccessControlConfiguration` | object | `{object}` | | The access control configuration for accessing workflow run contents. |
| `definitionParameters` | object | `{object}` | | Parameters for the definition template. |
| `diagnosticEventHubAuthorizationRuleId` | string | `''` | | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
| `diagnosticEventHubName` | string | `''` | | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. |
| `diagnosticLogCategoriesToEnable` | array | `[WorkflowRuntime]` | `[WorkflowRuntime]` | The name of logs that will be streamed. |
| `diagnosticLogsRetentionInDays` | int | `365` | | Specifies the number of days that logs will be kept for; a value of 0 will retain data indefinitely. |
| `diagnosticLogsRetentionInDays` | int | `365` | | Specifies the number of days that logs will be kept for; a value of 0 will retain data indefinitely. |
| `diagnosticMetricsToEnable` | array | `[AllMetrics]` | `[AllMetrics]` | The name of metrics that will be streamed. |
| `diagnosticSettingsName` | string | `[format('{0}-diagnosticSettings', parameters('name'))]` | | The name of the diagnostic setting, if deployed. |
| `diagnosticStorageAccountId` | string | `''` | | Resource ID of the diagnostic storage account. |
| `diagnosticWorkspaceId` | string | `''` | | Resource ID of the diagnostic log analytics workspace. |
| `enableDefaultTelemetry` | bool | `True` | | Enable telemetry via the Customer Usage Attribution ID (GUID). |
| `integrationAccount` | object | `{object}` | | The integration account. |
| `integrationServiceEnvironment` | object | `{object}` | | The integration service environment. |
| `location` | string | `[resourceGroup().location]` | | Location for all resources. |
| `diagnosticSettingsName` | string | `[format('{0}-diagnosticSettings', parameters('name'))]` | | The name of the diagnostic setting, if deployed. |
| `diagnosticStorageAccountId` | string | `''` | | Resource ID of the diagnostic storage account. |
| `diagnosticWorkspaceId` | string | `''` | | Resource ID of the diagnostic log analytics workspace. |
| `enableDefaultTelemetry` | bool | `True` | | Enable telemetry via the Customer Usage Attribution ID (GUID). |
| `integrationAccount` | object | `{object}` | | The integration account. |
| `integrationServiceEnvironmentResourceId` | string | `''` | | The integration service environment Id. |
| `location` | string | `[resourceGroup().location]` | | Location for all resources. |
| `lock` | string | `''` | `['', CanNotDelete, ReadOnly]` | Specify the type of lock. |
| `roleAssignments` | array | `[]` | | Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalId' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
| `roleAssignments` | array | `[]` | | Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalId' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
| `state` | string | `'Enabled'` | `[Completed, Deleted, Disabled, Enabled, NotSpecified, Suspended]` | The state. - NotSpecified, Completed, Enabled, Disabled, Deleted, Suspended. |
| `systemAssignedIdentity` | bool | `False` | | Enables system assigned managed identity on the resource. |
| `tags` | object | `{object}` | | Tags of the resource. |
| `triggersAccessControlConfiguration` | object | `{object}` | | The access control configuration for invoking workflow triggers. |
| `userAssignedIdentities` | object | `{object}` | | The ID(s) to assign to the resource. |
| `workflowActions` | object | `{object}` | | The definitions for one or more actions to execute at workflow runtime. |
| `workflowEndpointsConfiguration` | object | `{object}` | | The endpoints configuration: Access endpoint and outgoing IP addresses for the workflow. |
| `workflowManagementAccessControlConfiguration` | object | `{object}` | | The access control configuration for workflow management. |
| `workflowOutputs` | object | `{object}` | | The definitions for the outputs to return from a workflow run. |
| `workflowParameters` | object | `{object}` | | The definitions for one or more parameters that pass the values to use at your logic app's runtime. |
| `workflowStaticResults` | object | `{object}` | | The definitions for one or more static results returned by actions as mock outputs when static results are enabled on those actions. In each action definition, the runtimeConfiguration.staticResult.name attribute references the corresponding definition inside staticResults. |
| `workflowTriggers` | object | `{object}` | | The definitions for one or more triggers that instantiate your workflow. You can define more than one trigger, but only with the Workflow Definition Language, not visually through the Logic Apps Designer. |

| `systemAssignedIdentity` | bool | `False` | | Enables system assigned managed identity on the resource. |
| `tags` | object | `{object}` | | Tags of the resource. |
| `triggersAccessControlConfiguration` | object | `{object}` | | The access control configuration for invoking workflow triggers. |
| `userAssignedIdentities` | object | `{object}` | | The ID(s) to assign to the resource. |
| `workflowActions` | object | `{object}` | | The definitions for one or more actions to execute at workflow runtime. |
| `workflowEndpointsConfiguration` | object | `{object}` | | The endpoints configuration: Access endpoint and outgoing IP addresses for the workflow. |
| `workflowManagementAccessControlConfiguration` | object | `{object}` | | The access control configuration for workflow management. |
| `workflowOutputs` | object | `{object}` | | The definitions for the outputs to return from a workflow run. |
| `workflowParameters` | object | `{object}` | | The definitions for one or more parameters that pass the values to use at your logic app's runtime. |
| `workflowStaticResults` | object | `{object}` | | The definitions for one or more static results returned by actions as mock outputs when static results are enabled on those actions. In each action definition, the runtimeConfiguration.staticResult.name attribute references the corresponding definition inside staticResults. |
| `workflowTriggers` | object | `{object}` | | The definitions for one or more triggers that instantiate your workflow. You can define more than one trigger, but only with the Workflow Definition Language, not visually through the Logic Apps Designer. |

### Parameter Usage `<accessControl>AccessControlConfiguration`

Expand Down Expand Up @@ -89,7 +88,6 @@ This module deploys a Logic App resource.

</details>


<details>

<summary>Bicep format</summary>
Expand Down Expand Up @@ -304,13 +302,17 @@ userAssignedIdentities: {

## Outputs

| Output Name | Type | Description |
| :-- | :-- | :-- |
| `location` | string | The location the resource was deployed into. |
| `name` | string | The name of the logic app. |
| `resourceGroupName` | string | The resource group the logic app was deployed into. |
| `resourceId` | string | The resource ID of the logic app. |
| `systemAssignedPrincipalId` | string | The principal ID of the system assigned identity. |
| Output Name | Type | Description |
| :-------------------------- | :----- | :-------------------------------------------------- |
| `location` | string | The location the resource was deployed into. |
| `name` | string | The name of the logic app. |
| `resourceGroupName` | string | The resource group the logic app was deployed into. |
| `resourceId` | string | The resource ID of the logic app. |
| `systemAssignedPrincipalId` | string | The principal ID of the system assigned identity. |

## Cross-referenced modules

_None_

## Cross-referenced modules

Expand All @@ -319,8 +321,9 @@ _None_
## Deployment examples

The following module usage examples are retrieved from the content of the files hosted in the module's `.test` folder.
>**Note**: The name of each example is based on the name of the file from which it is taken.
>**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.

> **Note**: The name of each example is based on the name of the file from which it is taken.
> **Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
<h3>Example 1: Parameters</h3>

Expand All @@ -335,53 +338,8 @@ module workflows './Microsoft.Logic/workflows/deploy.bicep' = {
// Required parameters
name: '<<namePrefix>>-az-lga-x-001'
// Non-required parameters
diagnosticEventHubAuthorizationRuleId: '/subscriptions/<<subscriptionId>>/resourceGroups/validation-rg/providers/Microsoft.EventHub/namespaces/adp-<<namePrefix>>-az-evhns-x-001/AuthorizationRules/RootManageSharedAccessKey'
diagnosticEventHubName: 'adp-<<namePrefix>>-az-evh-x-001'
diagnosticLogsRetentionInDays: 7
diagnosticStorageAccountId: '/subscriptions/<<subscriptionId>>/resourceGroups/validation-rg/providers/Microsoft.Storage/storageAccounts/adp<<namePrefix>>azsax001'
diagnosticWorkspaceId: '/subscriptions/<<subscriptionId>>/resourcegroups/validation-rg/providers/microsoft.operationalinsights/workspaces/adp-<<namePrefix>>-az-law-x-001'
lock: 'CanNotDelete'
roleAssignments: [
{
principalIds: [
'<<deploymentSpId>>'
]
roleDefinitionIdOrName: 'Reader'
}
]
systemAssignedIdentity: true
tags: {}
workflowActions: {
HTTP: {
inputs: {
body: {
BeginPeakTime: '[BeginPeakTime]'
EndPeakTime: '[EndPeakTime]'
HostPoolName: '[HostPoolName]'
LAWorkspaceName: '[LAWorkspaceName]'
LimitSecondsToForceLogOffUser: '[LimitSecondsToForceLogOffUser]'
LogOffMessageBody: '[LogOffMessageBody]'
LogOffMessageTitle: '[LogOffMessageTitle]'
MinimumNumberOfRDSH: 1
ResourceGroupName: '[ResourceGroupName]'
SessionThresholdPerCPU: 1
UtcOffset: '[UtcOffset]'
}
method: 'POST'
uri: 'https://testStringForValidation.com'
}
type: 'Http'
}
}
workflowTriggers: {
Recurrence: {
recurrence: {
frequency: 'Minute'
interval: 15
}
type: 'Recurrence'
}
}
}
}
```
Expand All @@ -403,74 +361,11 @@ module workflows './Microsoft.Logic/workflows/deploy.bicep' = {
"value": "<<namePrefix>>-az-lga-x-001"
},
// Non-required parameters
"diagnosticEventHubAuthorizationRuleId": {
"value": "/subscriptions/<<subscriptionId>>/resourceGroups/validation-rg/providers/Microsoft.EventHub/namespaces/adp-<<namePrefix>>-az-evhns-x-001/AuthorizationRules/RootManageSharedAccessKey"
},
"diagnosticEventHubName": {
"value": "adp-<<namePrefix>>-az-evh-x-001"
},
"diagnosticLogsRetentionInDays": {
"value": 7
},
"diagnosticStorageAccountId": {
"value": "/subscriptions/<<subscriptionId>>/resourceGroups/validation-rg/providers/Microsoft.Storage/storageAccounts/adp<<namePrefix>>azsax001"
},
"diagnosticWorkspaceId": {
"value": "/subscriptions/<<subscriptionId>>/resourcegroups/validation-rg/providers/microsoft.operationalinsights/workspaces/adp-<<namePrefix>>-az-law-x-001"
},
"lock": {
"value": "CanNotDelete"
},
"roleAssignments": {
"value": [
{
"principalIds": [
"<<deploymentSpId>>"
],
"roleDefinitionIdOrName": "Reader"
}
]
},
"systemAssignedIdentity": {
"value": true
},
"tags": {
"value": {}
},
"workflowActions": {
"value": {
"HTTP": {
"inputs": {
"body": {
"BeginPeakTime": "[BeginPeakTime]",
"EndPeakTime": "[EndPeakTime]",
"HostPoolName": "[HostPoolName]",
"LAWorkspaceName": "[LAWorkspaceName]",
"LimitSecondsToForceLogOffUser": "[LimitSecondsToForceLogOffUser]",
"LogOffMessageBody": "[LogOffMessageBody]",
"LogOffMessageTitle": "[LogOffMessageTitle]",
"MinimumNumberOfRDSH": 1,
"ResourceGroupName": "[ResourceGroupName]",
"SessionThresholdPerCPU": 1,
"UtcOffset": "[UtcOffset]"
},
"method": "POST",
"uri": "https://testStringForValidation.com"
},
"type": "Http"
}
}
},
"workflowTriggers": {
"value": {
"Recurrence": {
"recurrence": {
"frequency": "Minute",
"interval": 15
},
"type": "Recurrence"
}
}
}
}
}
Expand Down

0 comments on commit f98c0be

Please sign in to comment.