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
hundredacres authored Aug 23, 2024
2 parents d2e3313 + 1ae65ad commit 43dd437
Show file tree
Hide file tree
Showing 58 changed files with 2,090 additions and 519 deletions.
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
"editorconfig.editorconfig",
"ms-vscode.powershell"
]
}
}
17 changes: 15 additions & 2 deletions avm/res/app/managed-environment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ This module deploys an App Managed Environment (also known as a Container App En

| Resource Type | API Version |
| :-- | :-- |
| `Microsoft.App/managedEnvironments` | [2023-11-02-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.App/2023-11-02-preview/managedEnvironments) |
| `Microsoft.App/managedEnvironments/storages` | [2023-11-02-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.App/2023-11-02-preview/managedEnvironments/storages) |
| `Microsoft.App/managedEnvironments` | [2024-02-02-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.App/2024-02-02-preview/managedEnvironments) |
| `Microsoft.App/managedEnvironments/storages` | [2024-02-02-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.App/2024-02-02-preview/managedEnvironments/storages) |
| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |

Expand Down Expand Up @@ -171,6 +171,7 @@ module managedEnvironment 'br/public:avm/res/app/managed-environment:<version>'
]
}
}
peerTrafficEncryption: true
platformReservedCidr: '172.17.17.0/24'
platformReservedDnsIP: '172.17.17.17'
roleAssignments: [
Expand Down Expand Up @@ -288,6 +289,9 @@ module managedEnvironment 'br/public:avm/res/app/managed-environment:<version>'
}
}
},
"peerTrafficEncryption": {
"value": true
},
"platformReservedCidr": {
"value": "172.17.17.0/24"
},
Expand Down Expand Up @@ -542,6 +546,7 @@ module managedEnvironment 'br/public:avm/res/app/managed-environment:<version>'
| [`logsDestination`](#parameter-logsdestination) | string | Logs destination. |
| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. |
| [`openTelemetryConfiguration`](#parameter-opentelemetryconfiguration) | object | Open Telemetry configuration. |
| [`peerTrafficEncryption`](#parameter-peertrafficencryption) | bool | Whether or not to encrypt peer traffic. |
| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
| [`storages`](#parameter-storages) | array | The list of storages to mount on the environment. |
| [`tags`](#parameter-tags) | object | Tags of the resource. |
Expand Down Expand Up @@ -761,6 +766,14 @@ Open Telemetry configuration.
- Type: object
- Default: `{}`

### Parameter: `peerTrafficEncryption`

Whether or not to encrypt peer traffic.

- Required: No
- Type: bool
- Default: `True`

### Parameter: `roleAssignments`

Array of role assignments to create.
Expand Down
10 changes: 9 additions & 1 deletion avm/res/app/managed-environment/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ param platformReservedCidr string = ''
@description('Conditional. An IP address from the IP range defined by "platformReservedCidr" that will be reserved for the internal DNS server. It must not be the first address in the range and can only be used when the environment is deployed into a virtual network. If not provided, it will be set with a default value by the platform. Required if zoneRedundant is set to true to make the resource WAF compliant.')
param platformReservedDnsIP string = ''

@description('Optional. Whether or not to encrypt peer traffic.')
param peerTrafficEncryption bool = true

@description('Optional. Whether or not this Managed Environment is zone-redundant.')
param zoneRedundant bool = true

Expand Down Expand Up @@ -146,7 +149,7 @@ resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2023-09
scope: resourceGroup(split(logAnalyticsWorkspaceResourceId, '/')[2], split(logAnalyticsWorkspaceResourceId, '/')[4])
}

resource managedEnvironment 'Microsoft.App/managedEnvironments@2023-11-02-preview' = {
resource managedEnvironment 'Microsoft.App/managedEnvironments@2024-02-02-preview' = {
name: name
location: location
tags: tags
Expand All @@ -170,6 +173,11 @@ resource managedEnvironment 'Microsoft.App/managedEnvironments@2023-11-02-previe
dnsSuffix: dnsSuffix
}
openTelemetryConfiguration: !empty(openTelemetryConfiguration) ? openTelemetryConfiguration : null
peerTrafficConfiguration: {
encryption: {
enabled: peerTrafficEncryption
}
}
vnetConfiguration: {
internal: internal
infrastructureSubnetId: !empty(infrastructureSubnetId) ? infrastructureSubnetId : null
Expand Down
22 changes: 17 additions & 5 deletions avm/res/app/managed-environment/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": "364014764379639426"
"templateHash": "13961196804563097956"
},
"name": "App ManagedEnvironments",
"description": "This module deploys an App Managed Environment (also known as a Container App Environment).",
Expand Down Expand Up @@ -285,6 +285,13 @@
"description": "Conditional. An IP address from the IP range defined by \"platformReservedCidr\" that will be reserved for the internal DNS server. It must not be the first address in the range and can only be used when the environment is deployed into a virtual network. If not provided, it will be set with a default value by the platform. Required if zoneRedundant is set to true to make the resource WAF compliant."
}
},
"peerTrafficEncryption": {
"type": "bool",
"defaultValue": true,
"metadata": {
"description": "Optional. Whether or not to encrypt peer traffic."
}
},
"zoneRedundant": {
"type": "bool",
"defaultValue": true,
Expand Down Expand Up @@ -372,7 +379,7 @@
"count": "[length(coalesce(parameters('storages'), createArray()))]"
},
"type": "Microsoft.App/managedEnvironments/storages",
"apiVersion": "2023-11-02-preview",
"apiVersion": "2024-02-02-preview",
"name": "[format('{0}/{1}', parameters('name'), coalesce(parameters('storages'), createArray())[copyIndex()].shareName)]",
"properties": {
"nfsAzureFile": "[if(equals(coalesce(parameters('storages'), createArray())[copyIndex()].kind, 'NFS'), createObject('accessMode', coalesce(parameters('storages'), createArray())[copyIndex()].accessMode, 'server', format('{0}.file.{1}', coalesce(parameters('storages'), createArray())[copyIndex()].storageAccountName, environment().suffixes.storage), 'shareName', format('/{0}/{1}', coalesce(parameters('storages'), createArray())[copyIndex()].storageAccountName, coalesce(parameters('storages'), createArray())[copyIndex()].shareName)), null())]",
Expand Down Expand Up @@ -413,7 +420,7 @@
},
"managedEnvironment": {
"type": "Microsoft.App/managedEnvironments",
"apiVersion": "2023-11-02-preview",
"apiVersion": "2024-02-02-preview",
"name": "[parameters('name')]",
"location": "[parameters('location')]",
"tags": "[parameters('tags')]",
Expand All @@ -437,6 +444,11 @@
"dnsSuffix": "[parameters('dnsSuffix')]"
},
"openTelemetryConfiguration": "[if(not(empty(parameters('openTelemetryConfiguration'))), parameters('openTelemetryConfiguration'), null())]",
"peerTrafficConfiguration": {
"encryption": {
"enabled": "[parameters('peerTrafficEncryption')]"
}
},
"vnetConfiguration": {
"internal": "[parameters('internal')]",
"infrastructureSubnetId": "[if(not(empty(parameters('infrastructureSubnetId'))), parameters('infrastructureSubnetId'), null())]",
Expand Down Expand Up @@ -502,7 +514,7 @@
"metadata": {
"description": "The location the resource was deployed into."
},
"value": "[reference('managedEnvironment', '2023-11-02-preview', 'full').location]"
"value": "[reference('managedEnvironment', '2024-02-02-preview', 'full').location]"
},
"name": {
"type": "string",
Expand All @@ -523,7 +535,7 @@
"metadata": {
"description": "The principal ID of the system assigned identity."
},
"value": "[coalesce(tryGet(tryGet(reference('managedEnvironment', '2023-11-02-preview', 'full'), 'identity'), 'principalId'), '')]"
"value": "[coalesce(tryGet(tryGet(reference('managedEnvironment', '2024-02-02-preview', 'full'), 'identity'), 'principalId'), '')]"
},
"defaultDomain": {
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
{
name: 'defaultSubnet'
properties: {
addressPrefix: cidrSubnet(addressPrefix, 16, 0)
addressPrefix: cidrSubnet(addressPrefix, 23, 0)
delegations: [
{
name: 'Microsoft.App.environments'
Expand Down Expand Up @@ -138,4 +138,4 @@ output managedIdentityResourceId string = managedIdentity.id
output appInsightsConnectionString string = appInsightsComponent.properties.ConnectionString

@description('The name of the created Storage Account.')
output storageAccountName string = storageAccount.name
output storageAccountName string = storageAccount.name
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ module testDeployment '../../../main.bicep' = [
]
internal: true
dockerBridgeCidr: '172.16.0.1/28'
peerTrafficEncryption: true
platformReservedCidr: '172.17.17.0/24'
platformReservedDnsIP: '172.17.17.17'
infrastructureSubnetId: nestedDependencies.outputs.subnetResourceId
Expand Down
4 changes: 2 additions & 2 deletions avm/res/app/managed-environment/version.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
"version": "0.6",
"version": "0.7",
"pathFilters": [
"./main.json"
]
}
}
4 changes: 2 additions & 2 deletions avm/res/db-for-my-sql/flexible-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ module flexibleServer 'br/public:avm/res/db-for-my-sql/flexible-server:<version>
}
]
geoRedundantBackup: 'Enabled'
highAvailability: 'SameZone'
highAvailability: 'ZoneRedundant'
location: '<location>'
lock: {
kind: 'CanNotDelete'
Expand Down Expand Up @@ -323,7 +323,7 @@ module flexibleServer 'br/public:avm/res/db-for-my-sql/flexible-server:<version>
"value": "Enabled"
},
"highAvailability": {
"value": "SameZone"
"value": "ZoneRedundant"
},
"location": {
"value": "<location>"
Expand Down
4 changes: 2 additions & 2 deletions avm/res/db-for-my-sql/flexible-server/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.28.1.47646",
"templateHash": "13929385437976763418"
"version": "0.29.47.4906",
"templateHash": "12125422157581852477"
},
"name": "DBforMySQL Flexible Servers",
"description": "This module deploys a DBforMySQL Flexible Server.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ module testDeployment '../../../main.bicep' = [
startIpAddress: '100.100.100.1'
}
]
highAvailability: 'SameZone'
highAvailability: 'ZoneRedundant'
storageAutoGrow: 'Enabled'
version: '8.0.21'
customerManagedKey: {
Expand Down
73 changes: 60 additions & 13 deletions avm/res/db-for-postgre-sql/flexible-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,18 @@ module flexibleServer 'br/public:avm/res/db-for-postgre-sql/flexible-server:<ver
params: {
// Required parameters
name: 'dfpsfsmin001'
skuName: 'Standard_B2s'
tier: 'Burstable'
skuName: 'Standard_D2s_v3'
tier: 'GeneralPurpose'
// Non-required parameters
administratorLogin: 'adminUserName'
administratorLoginPassword: '<administratorLoginPassword>'
administrators: [
{
objectId: '<objectId>'
principalName: '<principalName>'
principalType: 'ServicePrincipal'
}
]
geoRedundantBackup: 'Enabled'
highAvailability: 'ZoneRedundant'
location: '<location>'
}
}
Expand All @@ -81,21 +87,27 @@ module flexibleServer 'br/public:avm/res/db-for-postgre-sql/flexible-server:<ver
"value": "dfpsfsmin001"
},
"skuName": {
"value": "Standard_B2s"
"value": "Standard_D2s_v3"
},
"tier": {
"value": "Burstable"
"value": "GeneralPurpose"
},
// Non-required parameters
"administratorLogin": {
"value": "adminUserName"
},
"administratorLoginPassword": {
"value": "<administratorLoginPassword>"
"administrators": {
"value": [
{
"objectId": "<objectId>",
"principalName": "<principalName>",
"principalType": "ServicePrincipal"
}
]
},
"geoRedundantBackup": {
"value": "Enabled"
},
"highAvailability": {
"value": "ZoneRedundant"
},
"location": {
"value": "<location>"
}
Expand Down Expand Up @@ -697,7 +709,14 @@ module flexibleServer 'br/public:avm/res/db-for-postgre-sql/flexible-server:<ver
}
]
geoRedundantBackup: 'Enabled'
highAvailability: 'ZoneRedundant'
location: '<location>'
maintenanceWindow: {
customWindow: 'Enabled'
dayOfWeek: 0
startHour: 1
startMinute: 0
}
privateDnsZoneArmResourceId: '<privateDnsZoneArmResourceId>'
tags: {
Environment: 'Non-Prod'
Expand Down Expand Up @@ -782,9 +801,20 @@ module flexibleServer 'br/public:avm/res/db-for-postgre-sql/flexible-server:<ver
"geoRedundantBackup": {
"value": "Enabled"
},
"highAvailability": {
"value": "ZoneRedundant"
},
"location": {
"value": "<location>"
},
"maintenanceWindow": {
"value": {
"customWindow": "Enabled",
"dayOfWeek": 0,
"startHour": 1,
"startMinute": 0
}
},
"privateDnsZoneArmResourceId": {
"value": "<privateDnsZoneArmResourceId>"
},
Expand Down Expand Up @@ -1314,7 +1344,15 @@ Properties for the maintenence window. If provided, 'customWindow' property must

- Required: No
- Type: object
- Default: `{}`
- Default:
```Bicep
{
customWindow: 'Enabled'
dayOfWeek: 0
startHour: 1
startMinute: 0
}
```

### Parameter: `passwordAuth`

Expand Down Expand Up @@ -1361,6 +1399,7 @@ Array of role assignments to create.
| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
| [`name`](#parameter-roleassignmentsname) | string | The name (as GUID) of the role assignment. If not provided, a GUID will be generated. |
| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |

### Parameter: `roleAssignments.principalId`
Expand Down Expand Up @@ -1411,6 +1450,13 @@ The description of the role assignment.
- Required: No
- Type: string

### Parameter: `roleAssignments.name`

The name (as GUID) of the role assignment. If not provided, a GUID will be generated.

- Required: No
- Type: string

### Parameter: `roleAssignments.principalType`

The principal type of the assigned principal ID.
Expand Down Expand Up @@ -1472,7 +1518,7 @@ PostgreSQL Server version.

- Required: No
- Type: string
- Default: `'15'`
- Default: `'16'`
- Allowed:
```Bicep
[
Expand All @@ -1481,6 +1527,7 @@ PostgreSQL Server version.
'13'
'14'
'15'
'16'
]
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.170.59819",
"templateHash": "17302939650459446486"
"version": "0.29.47.4906",
"templateHash": "9786947819042824705"
},
"name": "DBforPostgreSQL Flexible Server Administrators",
"description": "This module deploys a DBforPostgreSQL Flexible Server Administrator.",
Expand Down
Loading

0 comments on commit 43dd437

Please sign in to comment.