Skip to content

Commit

Permalink
fix: 1507 linux asp (Azure#1711)
Browse files Browse the repository at this point in the history
## Description

Fixes [issue
1507](Azure#1507)
logged relating to Linux ASP selection and the reserved property.


<!--
>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#1507
Closes Azure#1507 
-->

## Pipeline Reference

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

| Pipeline |
| -------- |
|
[![avm.res.web.serverfarm](https://github.com/tsc-buddy/bicep-registry-modules/actions/workflows/avm.res.web.serverfarm.yml/badge.svg?branch=fix%2F1507-linux-asp)](https://github.com/tsc-buddy/bicep-registry-modules/actions/workflows/avm.res.web.serverfarm.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)
- [ ] Azure Verified Module updates:
- [x] Bugfix containing backwards compatible bug fixes, and I have NOT
bumped the MAJOR or MINOR version in `version.json`:
- [x] 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`.
  - [x] 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
tsc-buddy authored Apr 19, 2024
1 parent 573eedd commit 77b523b
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
26 changes: 13 additions & 13 deletions avm/res/web/serverfarm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ module serverfarm 'br/public:avm/res/web/serverfarm:<version>' = {
// Required parameters
name: 'wsfmax001'
sku: {
capacity: 3
family: 'P'
name: 'P1v3'
size: 'P1v3'
tier: 'Premium'
capacity: 1
family: 'S'
name: 'S1'
size: 'S1'
tier: 'Standard'
}
// Non-required parameters
diagnosticSettings: [
Expand Down Expand Up @@ -162,7 +162,7 @@ module serverfarm 'br/public:avm/res/web/serverfarm:<version>' = {
'hidden-title': 'This is visible in the resource name'
Role: 'DeploymentValidation'
}
zoneRedundant: true
zoneRedundant: false
}
}
```
Expand All @@ -185,11 +185,11 @@ module serverfarm 'br/public:avm/res/web/serverfarm:<version>' = {
},
"sku": {
"value": {
"capacity": 3,
"family": "P",
"name": "P1v3",
"size": "P1v3",
"tier": "Premium"
"capacity": 1,
"family": "S",
"name": "S1",
"size": "S1",
"tier": "Standard"
}
},
// Non-required parameters
Expand Down Expand Up @@ -251,7 +251,7 @@ module serverfarm 'br/public:avm/res/web/serverfarm:<version>' = {
}
},
"zoneRedundant": {
"value": true
"value": false
}
}
}
Expand Down Expand Up @@ -439,7 +439,7 @@ Defaults to false when creating Windows/app App Service Plan. Required if creati

- Required: No
- Type: bool
- Default: `False`
- Default: `[equals(parameters('kind'), 'Linux')]`

### Parameter: `appServiceEnvironmentId`

Expand Down
2 changes: 1 addition & 1 deletion avm/res/web/serverfarm/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ param location string = resourceGroup().location
param kind string = 'App'

@description('Conditional. Defaults to false when creating Windows/app App Service Plan. Required if creating a Linux App Service Plan and must be set to true.')
param reserved bool = false
param reserved bool = (kind == 'Linux')

@description('Optional. The Resource ID of the App Service Environment to use for the App Service Plan.')
param appServiceEnvironmentId string = ''
Expand Down
6 changes: 3 additions & 3 deletions avm/res/web/serverfarm/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": "12495804892051718765"
"version": "0.26.170.59819",
"templateHash": "16669238654401736455"
},
"name": "App Service Plan",
"description": "This module deploys an App Service Plan.",
Expand Down Expand Up @@ -231,7 +231,7 @@
},
"reserved": {
"type": "bool",
"defaultValue": false,
"defaultValue": "[equals(parameters('kind'), 'Linux')]",
"metadata": {
"description": "Conditional. Defaults to false when creating Windows/app App Service Plan. Required if creating a Linux App Service Plan and must be set to true."
}
Expand Down
12 changes: 6 additions & 6 deletions avm/res/web/serverfarm/tests/e2e/max/main.test.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ module testDeployment '../../../main.bicep' = [
name: '${namePrefix}${serviceShort}001'
location: tempLocation
sku: {
name: 'P1v3'
tier: 'Premium'
size: 'P1v3'
family: 'P'
capacity: 3
name: 'S1'
tier: 'Standard'
size: 'S1'
family: 'S'
capacity: 1
}
perSiteScaling: true
zoneRedundant: true
zoneRedundant: false
kind: 'App'
lock: {
name: 'lock'
Expand Down

0 comments on commit 77b523b

Please sign in to comment.