Skip to content

Commit

Permalink
Merge branch 'Azure:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
rahalan authored May 7, 2024
2 parents bdcd0c0 + 3c77b46 commit d7f5f56
Show file tree
Hide file tree
Showing 63 changed files with 752 additions and 499 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/platform.publish-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
$functionInput = @{
Version = "${{ steps.publish_tag.outputs.version }}"
PublishedModuleName = "${{ steps.publish_tag.outputs.publishedModuleName }}"
GitTagName = "${{ steps.publish_step.outputs.gitTagName }}"
GitTagName = "${{ steps.publish_tag.outputs.gitTagName }}"
}
Expand Down
4 changes: 2 additions & 2 deletions avm/res/app/managed-environment/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "1208664329573960589"
"version": "0.26.170.59819",
"templateHash": "17801833041272323788"
},
"name": "App ManagedEnvironments",
"description": "This module deploys an App Managed Environment (also known as a Container App Environment).",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
}
]
}

}

@description('The resource ID of the created Virtual Network Subnet.')
Expand Down
50 changes: 26 additions & 24 deletions avm/res/app/managed-environment/tests/e2e/defaults/main.test.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -45,29 +45,31 @@ module nestedDependencies 'dependencies.bicep' = {
// ============== //

@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'
logAnalyticsWorkspaceResourceId: nestedDependencies.outputs.logAnalyticsWorkspaceResourceId
location: resourceLocation
workloadProfiles: [
{
workloadProfileType: 'D4'
name: 'CAW01'
minimumCount: 0
maximumCount: 3
}
module testDeployment '../../../main.bicep' = [
for iteration in ['init', 'idem']: {
scope: resourceGroup
name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}'
params: {
name: '${namePrefix}${serviceShort}001'
logAnalyticsWorkspaceResourceId: nestedDependencies.outputs.logAnalyticsWorkspaceResourceId
location: resourceLocation
workloadProfiles: [
{
workloadProfileType: 'D4'
name: 'CAW01'
minimumCount: 0
maximumCount: 3
}
]
internal: true
dockerBridgeCidr: '172.16.0.1/28'
platformReservedCidr: '172.17.17.0/24'
platformReservedDnsIP: '172.17.17.17'
infrastructureSubnetId: nestedDependencies.outputs.subnetResourceId
infrastructureResourceGroupName: 'me-${resourceGroupName}'
}
dependsOn: [
nestedDependencies
]
internal: true
dockerBridgeCidr: '172.16.0.1/28'
platformReservedCidr: '172.17.17.0/24'
platformReservedDnsIP: '172.17.17.17'
infrastructureSubnetId: nestedDependencies.outputs.subnetResourceId
infrastructureResourceGroupName: 'me-${resourceGroupName}'
}
dependsOn: [
nestedDependencies
]
}]
]
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
}
]
}

}

resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
Expand Down
101 changes: 53 additions & 48 deletions avm/res/app/managed-environment/tests/e2e/max/main.test.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -46,55 +46,60 @@ module nestedDependencies 'dependencies.bicep' = {
// ============== //

@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'
logAnalyticsWorkspaceResourceId: nestedDependencies.outputs.logAnalyticsWorkspaceResourceId
location: resourceLocation
workloadProfiles: [
{
workloadProfileType: 'D4'
name: 'CAW01'
minimumCount: 0
maximumCount: 3
}
]
internal: true
dockerBridgeCidr: '172.16.0.1/28'
platformReservedCidr: '172.17.17.0/24'
platformReservedDnsIP: '172.17.17.17'
infrastructureSubnetId: nestedDependencies.outputs.subnetResourceId
infrastructureResourceGroupName: 'me-${resourceGroupName}'
roleAssignments: [
{
roleDefinitionIdOrName: 'Owner'
principalId: nestedDependencies.outputs.managedIdentityPrincipalId
principalType: 'ServicePrincipal'
}
{
roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
principalId: nestedDependencies.outputs.managedIdentityPrincipalId
principalType: 'ServicePrincipal'
module testDeployment '../../../main.bicep' = [
for iteration in ['init', 'idem']: {
scope: resourceGroup
name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}'
params: {
name: '${namePrefix}${serviceShort}001'
logAnalyticsWorkspaceResourceId: nestedDependencies.outputs.logAnalyticsWorkspaceResourceId
location: resourceLocation
workloadProfiles: [
{
workloadProfileType: 'D4'
name: 'CAW01'
minimumCount: 0
maximumCount: 3
}
]
internal: true
dockerBridgeCidr: '172.16.0.1/28'
platformReservedCidr: '172.17.17.0/24'
platformReservedDnsIP: '172.17.17.17'
infrastructureSubnetId: nestedDependencies.outputs.subnetResourceId
infrastructureResourceGroupName: 'me-${resourceGroupName}'
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'
}
]

lock: {
kind: 'CanNotDelete'
name: 'myCustomLockName'
}
{
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'
Env: 'test'
}
]

lock: {
kind: 'CanNotDelete'
name: 'myCustomLockName'
}
tags: {
'hidden-title': 'This is visible in the resource name'
Env: 'test'
}
dependsOn: [
nestedDependencies
]
}
dependsOn: [
nestedDependencies
]
}]
]
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
}
]
}

}

resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,54 +46,59 @@ module nestedDependencies 'dependencies.bicep' = {
// ============== //

@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'
logAnalyticsWorkspaceResourceId: nestedDependencies.outputs.logAnalyticsWorkspaceResourceId
location: resourceLocation
workloadProfiles: [
{
workloadProfileType: 'D4'
name: 'CAW01'
minimumCount: 0
maximumCount: 3
}
]
internal: true
dockerBridgeCidr: '172.16.0.1/28'
platformReservedCidr: '172.17.17.0/24'
platformReservedDnsIP: '172.17.17.17'
infrastructureSubnetId: nestedDependencies.outputs.subnetResourceId
infrastructureResourceGroupName: 'me-${resourceGroupName}'
roleAssignments: [
{
roleDefinitionIdOrName: 'Owner'
principalId: nestedDependencies.outputs.managedIdentityPrincipalId
principalType: 'ServicePrincipal'
module testDeployment '../../../main.bicep' = [
for iteration in ['init', 'idem']: {
scope: resourceGroup
name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}'
params: {
name: '${namePrefix}${serviceShort}001'
logAnalyticsWorkspaceResourceId: nestedDependencies.outputs.logAnalyticsWorkspaceResourceId
location: resourceLocation
workloadProfiles: [
{
workloadProfileType: 'D4'
name: 'CAW01'
minimumCount: 0
maximumCount: 3
}
]
internal: true
dockerBridgeCidr: '172.16.0.1/28'
platformReservedCidr: '172.17.17.0/24'
platformReservedDnsIP: '172.17.17.17'
infrastructureSubnetId: nestedDependencies.outputs.subnetResourceId
infrastructureResourceGroupName: 'me-${resourceGroupName}'
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'
}
]
lock: {
kind: 'CanNotDelete'
name: 'myCustomLockName'
}
{
roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
principalId: nestedDependencies.outputs.managedIdentityPrincipalId
principalType: 'ServicePrincipal'
tags: {
'hidden-title': 'This is visible in the resource name'
Env: 'test'
}
{
roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
principalId: nestedDependencies.outputs.managedIdentityPrincipalId
principalType: 'ServicePrincipal'
}
]
lock: {
kind: 'CanNotDelete'
name: 'myCustomLockName'
}
tags: {
'hidden-title': 'This is visible in the resource name'
Env: 'test'
}
dependsOn: [
nestedDependencies
]
}
dependsOn: [
nestedDependencies
]
}]
]
2 changes: 1 addition & 1 deletion avm/res/automation/automation-account/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This module deploys an Azure Automation Account.
| `Microsoft.Automation/automationAccounts` | [2022-08-08](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Automation/2022-08-08/automationAccounts) |
| `Microsoft.Automation/automationAccounts/jobSchedules` | [2022-08-08](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Automation/2022-08-08/automationAccounts/jobSchedules) |
| `Microsoft.Automation/automationAccounts/modules` | [2022-08-08](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Automation/2022-08-08/automationAccounts/modules) |
| `Microsoft.Automation/automationAccounts/runbooks` | [2022-08-08](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Automation/2022-08-08/automationAccounts/runbooks) |
| `Microsoft.Automation/automationAccounts/runbooks` | [2023-11-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Automation/2023-11-01/automationAccounts/runbooks) |
| `Microsoft.Automation/automationAccounts/schedules` | [2022-08-08](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Automation/2022-08-08/automationAccounts/schedules) |
| `Microsoft.Automation/automationAccounts/softwareUpdateConfigurations` | [2019-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Automation/2019-06-01/automationAccounts/softwareUpdateConfigurations) |
| `Microsoft.Automation/automationAccounts/variables` | [2022-08-08](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Automation/2022-08-08/automationAccounts/variables) |
Expand Down
4 changes: 2 additions & 2 deletions avm/res/automation/automation-account/job-schedule/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "3709450248827326388"
"version": "0.26.170.59819",
"templateHash": "1753602189799388874"
},
"name": "Automation Account Job Schedules",
"description": "This module deploys an Azure Automation Account Job Schedule.",
Expand Down
8 changes: 4 additions & 4 deletions avm/res/automation/automation-account/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ var formattedUserAssignedIdentities = reduce(
var identity = !empty(managedIdentities)
? {
type: (managedIdentities.?systemAssigned ?? false)
? (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'SystemAssigned,UserAssigned' : 'SystemAssigned')
: (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'UserAssigned' : null)
? (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'SystemAssigned, UserAssigned' : 'SystemAssigned')
: (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'UserAssigned' : 'None')
userAssignedIdentities: !empty(formattedUserAssignedIdentities) ? formattedUserAssignedIdentities : null
}
: null
Expand Down Expand Up @@ -172,15 +172,15 @@ resource automationAccount 'Microsoft.Automation/automationAccounts@2022-08-08'
}
encryption: !empty(customerManagedKey)
? {
keySource: 'Microsoft.KeyVault'
keySource: 'Microsoft.Keyvault'
identity: !empty(customerManagedKey.?userAssignedIdentityResourceId)
? {
userAssignedIdentity: cMKUserAssignedIdentity.id
}
: null
keyVaultProperties: {
keyName: customerManagedKey!.keyName
keyVaultUri: cMKKeyVault.properties.vaultUri
keyvaultUri: cMKKeyVault.properties.vaultUri
keyVersion: !empty(customerManagedKey.?keyVersion ?? '')
? customerManagedKey!.keyVersion
: last(split(cMKKeyVault::cMKKey.properties.keyUriWithVersion, '/'))
Expand Down
Loading

0 comments on commit d7f5f56

Please sign in to comment.