Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix proximityPlacementGroup bug #950

Merged
merged 4 commits into from
Feb 1, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions arm/Microsoft.Compute/availabilitySets/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,23 @@ param tags object = {}
@description('Optional. Customer Usage Attribution ID (GUID). This GUID must be previously registered')
param cuaId string = ''

var proximityPlacementGroup = {
id: proximityPlacementGroupId
}

module pid_cuaId '.bicep/nested_cuaId.bicep' = if (!empty(cuaId)) {
name: 'pid-${cuaId}'
params: {}
}

resource availabilitySet 'Microsoft.Compute/availabilitySets@2021-04-01' = {
resource availabilitySet 'Microsoft.Compute/availabilitySets@2021-07-01' = {
name: name
location: location
tags: tags
properties: {
platformFaultDomainCount: availabilitySetFaultDomain
platformUpdateDomainCount: availabilitySetUpdateDomain
proximityPlacementGroup: !empty(proximityPlacementGroupId) ? proximityPlacementGroupId : null
proximityPlacementGroup: !empty(proximityPlacementGroupId) ? proximityPlacementGroup : null
}
sku: {
name: availabilitySetSku
Expand Down
4 changes: 2 additions & 2 deletions arm/Microsoft.Compute/availabilitySets/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This template deploys an availability set
| :-- | :-- |
| `Microsoft.Authorization/locks` | 2017-04-01 |
| `Microsoft.Authorization/roleAssignments` | 2021-04-01-preview |
| `Microsoft.Compute/availabilitySets` | 2021-04-01 |
| `Microsoft.Compute/availabilitySets` | 2021-07-01 |

## Parameters

Expand Down Expand Up @@ -74,6 +74,6 @@ Tag names and tag values can be provided as needed. A tag can be left without a

## Template references

- [Availabilitysets](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Compute/2021-04-01/availabilitySets)
- [Availabilitysets](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Compute/2021-07-01/availabilitySets)
- [Locks](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2017-04-01/locks)
- [Roleassignments](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Authorization/roleAssignments)