Skip to content

Commit

Permalink
fix: data-factory and databricks missing v2 formatting (Azure#1624)
Browse files Browse the repository at this point in the history
## Description

<!--
>Thank you for your contribution !
> Please include a summary of the change and which issue is fixed.
> Please also include the context.
> List any dependencies that are required for this change.

Fixes Azure#123
Fixes Azure#456
Closes Azure#123
Closes Azure#456
-->

## Pipeline Reference

<!-- Insert your Pipeline Status Badge below -->

| Pipeline |
| -------- |
|
[![avm.res.data-factory.factory](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.res.data-factory.factory.yml/badge.svg?branch=fix%2Fmissing-v2-formatting)](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.res.data-factory.factory.yml)
|
|
[![avm.res.databricks.workspace](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.res.databricks.workspace.yml/badge.svg?branch=fix%2Fmissing-v2-formatting)](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.res.databricks.workspace.yml)
|

## Type of Change

<!-- Use the check-boxes [x] on the options that are relevant. -->

- [ ] Update to CI Environment or utlities (Non-module effecting
changes)
- [x] Azure Verified Module updates:
- [x] Bugfix containing backwards compatible bug fixes, and I have NOT
bumped the MAJOR or MINOR version in `version.json`:
- [ ] Someone has opened a bug report issue, and I have included "Closes
#{bug_report_issue_number}" in the PR description.
- [ ] The bug was found by the module author, and no one has opened an
issue to report it yet.
- [ ] Feature update backwards compatible feature updates, and I have
bumped the MINOR version in `version.json`.
- [ ] Breaking changes and I have bumped the MAJOR version in
`version.json`.
  - [ ] Update to documentation

## Checklist

- [x] I'm sure there are no other open Pull Requests for the same
update/change
- [x] I have run `Set-AVMModule` locally to generate the supporting
module files.
- [x] My corresponding pipelines / checks run clean and green without
any errors or warnings

<!-- Please keep up to day with the contribution guide at
https://aka.ms/avm/contribute/bicep -->
  • Loading branch information
eriqua authored Apr 9, 2024
1 parent bf90b18 commit 0d918aa
Show file tree
Hide file tree
Showing 6 changed files with 173 additions and 157 deletions.
22 changes: 12 additions & 10 deletions avm/res/data-factory/factory/managed-virtual-network/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,19 @@ resource managedVirtualNetwork 'Microsoft.DataFactory/factories/managedVirtualNe
properties: {}
}

module managedVirtualNetwork_managedPrivateEndpoint 'managed-private-endpoint/main.bicep' = [for (managedPrivateEndpoint, index) in managedPrivateEndpoints: {
name: '${deployment().name}-managedPrivateEndpoint-${index}'
params: {
dataFactoryName: dataFactoryName
managedVirtualNetworkName: name
name: managedPrivateEndpoint.name
fqdns: managedPrivateEndpoint.fqdns
groupId: managedPrivateEndpoint.groupId
privateLinkResourceId: managedPrivateEndpoint.privateLinkResourceId
module managedVirtualNetwork_managedPrivateEndpoint 'managed-private-endpoint/main.bicep' = [
for (managedPrivateEndpoint, index) in managedPrivateEndpoints: {
name: '${deployment().name}-managedPrivateEndpoint-${index}'
params: {
dataFactoryName: dataFactoryName
managedVirtualNetworkName: name
name: managedPrivateEndpoint.name
fqdns: managedPrivateEndpoint.fqdns
groupId: managedPrivateEndpoint.groupId
privateLinkResourceId: managedPrivateEndpoint.privateLinkResourceId
}
}
}]
]

@description('The name of the Resource Group the Managed Virtual Network was created in.')
output resourceGroupName string = resourceGroup().name
Expand Down
16 changes: 9 additions & 7 deletions avm/res/data-factory/factory/tests/e2e/defaults/main.test.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
// ============== //

@batchSize(1)
module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
scope: resourceGroup
name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}'
params: {
name: '${namePrefix}${serviceShort}001'
location: resourceLocation
module testDeployment '../../../main.bicep' = [
for iteration in ['init', 'idem']: {
scope: resourceGroup
name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}'
params: {
name: '${namePrefix}${serviceShort}001'
location: resourceLocation
}
}
}]
]
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ resource keyPermissions 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
properties: {
principalId: managedIdentity.properties.principalId
// Key Vault Crypto User
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '12338af0-0e69-4776-bea7-57ae8d297424')
roleDefinitionId: subscriptionResourceId(
'Microsoft.Authorization/roleDefinitions',
'12338af0-0e69-4776-bea7-57ae8d297424'
)
principalType: 'ServicePrincipal'
}
}
Expand Down
213 changes: 109 additions & 104 deletions avm/res/data-factory/factory/tests/e2e/max/main.test.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -62,119 +62,124 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t
// ============== //

@batchSize(1)
module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
scope: resourceGroup
name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}'
params: {
name: '${namePrefix}${serviceShort}001'
location: resourceLocation
customerManagedKey: {
keyName: nestedDependencies.outputs.keyVaultEncryptionKeyName
keyVaultResourceId: nestedDependencies.outputs.keyVaultResourceId
userAssignedIdentityResourceId: nestedDependencies.outputs.managedIdentityResourceId
}
diagnosticSettings: [
{
name: 'customSetting'
metricCategories: [
{
category: 'AllMetrics'
}
]
eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
module testDeployment '../../../main.bicep' = [
for iteration in ['init', 'idem']: {
scope: resourceGroup
name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}'
params: {
name: '${namePrefix}${serviceShort}001'
location: resourceLocation
customerManagedKey: {
keyName: nestedDependencies.outputs.keyVaultEncryptionKeyName
keyVaultResourceId: nestedDependencies.outputs.keyVaultResourceId
userAssignedIdentityResourceId: nestedDependencies.outputs.managedIdentityResourceId
}
]
gitConfigureLater: true
globalParameters: {
testParameter1: {
type: 'String'
value: 'testValue1'
diagnosticSettings: [
{
name: 'customSetting'
metricCategories: [
{
category: 'AllMetrics'
}
]
eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
}
]
gitConfigureLater: true
globalParameters: {
testParameter1: {
type: 'String'
value: 'testValue1'
}
}
}
integrationRuntimes: [
{
managedVirtualNetworkName: 'default'
name: 'AutoResolveIntegrationRuntime'
type: 'Managed'
typeProperties: {
computeProperties: {
location: 'AutoResolve'
integrationRuntimes: [
{
managedVirtualNetworkName: 'default'
name: 'AutoResolveIntegrationRuntime'
type: 'Managed'
typeProperties: {
computeProperties: {
location: 'AutoResolve'
}
}
}
}

{
name: 'TestRuntime'
type: 'SelfHosted'
}
]
lock: {
kind: 'CanNotDelete'
name: 'myCustomLockName'
}
managedPrivateEndpoints: [
{
fqdns: [
nestedDependencies.outputs.storageAccountBlobEndpoint
]
groupId: 'blob'
name: '${nestedDependencies.outputs.storageAccountName}-managed-privateEndpoint'
privateLinkResourceId: nestedDependencies.outputs.storageAccountResourceId
}
]
managedVirtualNetworkName: 'default'
privateEndpoints: [
{
privateDnsZoneResourceIds: [
nestedDependencies.outputs.privateDNSZoneResourceId
]
subnetResourceId: nestedDependencies.outputs.subnetResourceId
tags: {
'hidden-title': 'This is visible in the resource name'
application: 'AVM'
{
name: 'TestRuntime'
type: 'SelfHosted'
}
]
lock: {
kind: 'CanNotDelete'
name: 'myCustomLockName'
}
{
privateDnsZoneResourceIds: [
nestedDependencies.outputs.privateDNSZoneResourceId
managedPrivateEndpoints: [
{
fqdns: [
nestedDependencies.outputs.storageAccountBlobEndpoint
]
groupId: 'blob'
name: '${nestedDependencies.outputs.storageAccountName}-managed-privateEndpoint'
privateLinkResourceId: nestedDependencies.outputs.storageAccountResourceId
}
]
managedVirtualNetworkName: 'default'
privateEndpoints: [
{
privateDnsZoneResourceIds: [
nestedDependencies.outputs.privateDNSZoneResourceId
]
subnetResourceId: nestedDependencies.outputs.subnetResourceId
tags: {
'hidden-title': 'This is visible in the resource name'
application: 'AVM'
}
}
{
privateDnsZoneResourceIds: [
nestedDependencies.outputs.privateDNSZoneResourceId
]
subnetResourceId: nestedDependencies.outputs.subnetResourceId
}
]
roleAssignments: [
{
roleDefinitionIdOrName: 'Owner'
principalId: nestedDependencies.outputs.managedIdentityPrincipalId
principalType: 'ServicePrincipal'
}
{
roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
principalId: nestedDependencies.outputs.managedIdentityPrincipalId
principalType: 'ServicePrincipal'
}
{
roleDefinitionIdOrName: subscriptionResourceId(
'Microsoft.Authorization/roleDefinitions',
'acdd72a7-3385-48ef-bd42-f606fba81ae7'
)
principalId: nestedDependencies.outputs.managedIdentityPrincipalId
principalType: 'ServicePrincipal'
}
]
managedIdentities: {
systemAssigned: true
userAssignedResourceIds: [
nestedDependencies.outputs.managedIdentityResourceId
]
subnetResourceId: nestedDependencies.outputs.subnetResourceId
}
]
roleAssignments: [
{
roleDefinitionIdOrName: 'Owner'
principalId: nestedDependencies.outputs.managedIdentityPrincipalId
principalType: 'ServicePrincipal'
}
{
roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
principalId: nestedDependencies.outputs.managedIdentityPrincipalId
principalType: 'ServicePrincipal'
}
{
roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
principalId: nestedDependencies.outputs.managedIdentityPrincipalId
principalType: 'ServicePrincipal'
tags: {
'hidden-title': 'This is visible in the resource name'
Environment: 'Non-Prod'
Role: 'DeploymentValidation'
}
]
managedIdentities: {
systemAssigned: true
userAssignedResourceIds: [
nestedDependencies.outputs.managedIdentityResourceId
]
}
tags: {
'hidden-title': 'This is visible in the resource name'
Environment: 'Non-Prod'
Role: 'DeploymentValidation'
}
dependsOn: [
nestedDependencies
diagnosticDependencies
]
}
dependsOn: [
nestedDependencies
diagnosticDependencies
]
}]
]
58 changes: 30 additions & 28 deletions avm/res/data-factory/factory/tests/e2e/waf-aligned/main.test.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -50,34 +50,36 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t
// ============== //

@batchSize(1)
module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
scope: resourceGroup
name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}'
params: {
name: '${namePrefix}${serviceShort}001'
location: resourceLocation
diagnosticSettings: [
{
eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
module testDeployment '../../../main.bicep' = [
for iteration in ['init', 'idem']: {
scope: resourceGroup
name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}'
params: {
name: '${namePrefix}${serviceShort}001'
location: resourceLocation
diagnosticSettings: [
{
eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
}
]
gitConfigureLater: true
integrationRuntimes: [
{
name: 'TestRuntime'
type: 'SelfHosted'
}
]
tags: {
'hidden-title': 'This is visible in the resource name'
Environment: 'Non-Prod'
Role: 'DeploymentValidation'
}
]
gitConfigureLater: true
integrationRuntimes: [
{
name: 'TestRuntime'
type: 'SelfHosted'
}
]
tags: {
'hidden-title': 'This is visible in the resource name'
Environment: 'Non-Prod'
Role: 'DeploymentValidation'
}
dependsOn: [
diagnosticDependencies
]
}
dependsOn: [
diagnosticDependencies
]
}]
]
16 changes: 9 additions & 7 deletions avm/res/databricks/workspace/tests/e2e/defaults/main.test.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
// ============== //

@batchSize(1)
module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
scope: resourceGroup
name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}'
params: {
name: '${namePrefix}${serviceShort}001'
location: resourceLocation
module testDeployment '../../../main.bicep' = [
for iteration in ['init', 'idem']: {
scope: resourceGroup
name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}'
params: {
name: '${namePrefix}${serviceShort}001'
location: resourceLocation
}
}
}]
]

0 comments on commit 0d918aa

Please sign in to comment.