Skip to content

Commit

Permalink
Avm vmss bootdiagnosticenabled (#3)
Browse files Browse the repository at this point in the history
* Update virtual machine resources and documentation

- Updated README.md in avmavm/res/compute/virtual-machine to include new setup instructions and usage examples.
- Modified main.bicep in avm/res/compute/virtual-machine to fix deployment issues and improve resource configuration.
- Updated main.json in avm/res/compute/virtual-machine to align with the latest schema and add new parameters for flexibility.

* Update VM scale set resources and documentation

- Updated README.md in avm/res/compute/virtual-machine-scale-set to include new setup instructions and usage examples.
- Modified main.bicep in avm/res/compute/virtual-machine-scale-set to fix deployment issues and improve resource configuration.
- Updated main.json in avm/res/compute/virtual-machine-scale-set to align with the latest schema and add new parameters for flexibility.

* Delete avm/res/compute/virtual-machine/main.json

* Delete avm/res/compute/virtual-machine/main.bicep

* Restore main.bicep, main.json, and README.md from upstream/main

* Fixed wrong placement of ',' in main.json

* fix: `Postgresql Flexible Server Pipeline Failure (Azure#3768)

## Description
 Updated AVM common types to version 0.2.1 

Fixes Azure#3642 
<!--
>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.db-for-postgre-sql.flexible-server](https://github.com/arnoldna/bicep-registry-modules/actions/workflows/avm.res.db-for-postgre-sql.flexible-server.yml/badge.svg?branch=avm%2Fres%2Fdb-for-postgre-sql%2Fflexible-server3)](https://github.com/arnoldna/bicep-registry-modules/actions/workflows/avm.res.db-for-postgre-sql.flexible-server.yml)
|

## Type of Change

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

- [ ] Update to CI Environment or utilities (Non-module affecting
changes)
- [X] Azure Verified Module updates:
- [ ] 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`.
  - [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 date with the contribution guide at
https://aka.ms/avm/contribute/bicep -->

* feat: Add common types in `avm/res/insights/component` (Azure#3769)

## Description

Using common types in `avm/res/insights/component`

## Pipeline Reference

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

| Pipeline |
| -------- |
|
[![avm.res.insights.component](https://github.com/krbar/bicep-registry-modules/actions/workflows/avm.res.insights.component.yml/badge.svg?branch=users%2Fkrbar%2FappInsightsCommonTypes)](https://github.com/krbar/bicep-registry-modules/actions/workflows/avm.res.insights.component.yml)
|

## Type of Change

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

- [ ] Update to CI Environment or utilities (Non-module affecting
changes)
- [x] Azure Verified Module updates:
- [ ] 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 date with the contribution guide at
https://aka.ms/avm/contribute/bicep -->

* Increased minor version

Reflecting 'bootdiagnosticenabled' change, the minor version has been increased.

---------

Co-authored-by: Zach Olinske <[email protected]>
Co-authored-by: Nate Arnold <[email protected]>
Co-authored-by: Kris Baranek <[email protected]>
  • Loading branch information
4 people authored Nov 15, 2024
1 parent 06767b4 commit ba508c7
Show file tree
Hide file tree
Showing 17 changed files with 308 additions and 355 deletions.
21 changes: 15 additions & 6 deletions avm/res/compute/virtual-machine-scale-set/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ module virtualMachineScaleSet 'br/public:avm/res/compute/virtual-machine-scale-s
availabilityZones: [
'2'
]
bootDiagnosticStorageAccountName: '<bootDiagnosticStorageAccountName>'
bootDiagnosticEnabled: false
dataDisks: [
{
caching: 'ReadOnly'
Expand Down Expand Up @@ -478,8 +478,8 @@ module virtualMachineScaleSet 'br/public:avm/res/compute/virtual-machine-scale-s
"2"
]
},
"bootDiagnosticStorageAccountName": {
"value": "<bootDiagnosticStorageAccountName>"
"bootDiagnosticEnabled": {
"value": false
},
"dataDisks": {
"value": [
Expand Down Expand Up @@ -689,7 +689,7 @@ param skuName = 'Standard_B12ms'
param availabilityZones = [
'2'
]
param bootDiagnosticStorageAccountName = '<bootDiagnosticStorageAccountName>'
param bootDiagnosticEnabled = false
param dataDisks = [
{
caching: 'ReadOnly'
Expand Down Expand Up @@ -2313,7 +2313,8 @@ param vmPriority = 'Regular'
| [`adminPassword`](#parameter-adminpassword) | securestring | When specifying a Windows Virtual Machine, this value should be passed. |
| [`automaticRepairsPolicyEnabled`](#parameter-automaticrepairspolicyenabled) | bool | Specifies whether automatic repairs should be enabled on the virtual machine scale set. |
| [`availabilityZones`](#parameter-availabilityzones) | array | The virtual machine scale set zones. NOTE: Availability zones can only be set when you create the scale set. |
| [`bootDiagnosticStorageAccountName`](#parameter-bootdiagnosticstorageaccountname) | string | Storage account used to store boot diagnostic information. Boot diagnostics will be disabled if no value is provided. |
| [`bootDiagnosticEnabled`](#parameter-bootDiagnosticEnabled) | string | Enable boot diagnostics to use default managed or secure storage. Defaults to false. |
| [`bootDiagnosticStorageAccountName`](#parameter-bootdiagnosticstorageaccountname) | string | The name of the boot diagnostic storage account. Provide this if you want to use your own storage account for security reasons instead of the recommended Microsoft Managed Storage Account..|
| [`bootDiagnosticStorageAccountUri`](#parameter-bootdiagnosticstorageaccounturi) | string | Storage account boot diagnostic base URI. |
| [`bypassPlatformSafetyChecksOnUserSchedule`](#parameter-bypassplatformsafetychecksonuserschedule) | bool | Enables customer to schedule patching without accidental upgrades. |
| [`customData`](#parameter-customdata) | string | Custom data associated to the VM, this value will be automatically converted into base64 to account for the expected VM format. |
Expand Down Expand Up @@ -2482,9 +2483,17 @@ The virtual machine scale set zones. NOTE: Availability zones can only be set wh
]
```

### Parameter: `bootDiagnosticEnabled`

Enable boot diagnostics to use default managed or secure storage.

- Required: No
- Type: boolen
- Default: false

### Parameter: `bootDiagnosticStorageAccountName`

Storage account used to store boot diagnostic information. Boot diagnostics will be disabled if no value is provided.
The name of the boot diagnostic storage account. Provide this if you want to use your own storage account for security reasons instead of the recommended Microsoft Managed Storage Account.

- Required: No
- Type: string
Expand Down
7 changes: 5 additions & 2 deletions avm/res/compute/virtual-machine-scale-set/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,12 @@ param extensionCustomScriptConfig object = {
@description('Optional. Storage account boot diagnostic base URI.')
param bootDiagnosticStorageAccountUri string = '.blob.${environment().suffixes.storage}/'

@description('Optional. Storage account used to store boot diagnostic information. Boot diagnostics will be disabled if no value is provided.')
@description('Optional. The name of the boot diagnostic storage account. Provide this if you want to use your own storage account for security reasons instead of the recommended Microsoft Managed Storage Account.')
param bootDiagnosticStorageAccountName string = ''

@description('Optional. Enable boot diagnostics to use default managed or secure storage. Defaults set to false.')
param bootDiagnosticEnabled bool = false

@description('Optional. The diagnostic settings of the service.')
param diagnosticSettings diagnosticSettingType

Expand Down Expand Up @@ -604,7 +607,7 @@ resource vmss 'Microsoft.Compute/virtualMachineScaleSets@2023-09-01' = {
}
diagnosticsProfile: {
bootDiagnostics: {
enabled: !empty(bootDiagnosticStorageAccountName)
enabled: !empty(bootDiagnosticStorageAccountName) ? true : bootDiagnosticEnabled
storageUri: !empty(bootDiagnosticStorageAccountName)
? 'https://${bootDiagnosticStorageAccountName}${bootDiagnosticStorageAccountUri}'
: null
Expand Down
11 changes: 9 additions & 2 deletions avm/res/compute/virtual-machine-scale-set/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,13 @@
"description": "Optional. The configuration for the [Custom Script] extension. Must at least contain the [\"enabled\": true] property to be executed."
}
},
"bootDiagnosticEnabled": {
"type": "bool",
"defaultValue": false,
"metadata": {
"description": "Optional. Whether boot diagnostics should be enabled on the Virtual Machine. Boot diagnostics will be enabled with a managed storage account if no bootDiagnosticsStorageAccountName value is provided. If bootDiagnostics and bootDiagnosticsStorageAccountName values are not provided, boot diagnostics will be disabled."
}
},
"bootDiagnosticStorageAccountUri": {
"type": "string",
"defaultValue": "[format('.blob.{0}/', environment().suffixes.storage)]",
Expand Down Expand Up @@ -1017,7 +1024,7 @@
},
"diagnosticsProfile": {
"bootDiagnostics": {
"enabled": "[not(empty(parameters('bootDiagnosticStorageAccountName')))]",
"enabled": "[if(not(empty(parameters('bootDiagnosticStorageAccountName'))), true(), parameters('bootDiagnosticEnabled'))]",
"storageUri": "[if(not(empty(parameters('bootDiagnosticStorageAccountName'))), format('https://{0}{1}', parameters('bootDiagnosticStorageAccountName'), parameters('bootDiagnosticStorageAccountUri')), null())]"
}
},
Expand Down Expand Up @@ -2467,4 +2474,4 @@
"value": "[reference('vmss', '2023-09-01', 'full').location]"
}
}
}
}
4 changes: 2 additions & 2 deletions avm/res/compute/virtual-machine-scale-set/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.4",
"version": "0.5",
"pathFilters": [
"./main.json"
]
}
}
25 changes: 15 additions & 10 deletions avm/res/db-for-postgre-sql/flexible-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ module flexibleServer 'br/public:avm/res/db-for-postgre-sql/flexible-server:<ver
name: 'flexibleServerDeployment'
params: {
// Required parameters
name: 'dfpsfse001'
name: 'dfpsfsmax001'
skuName: 'Standard_D2s_v3'
tier: 'GeneralPurpose'
// Non-required parameters
Expand Down Expand Up @@ -183,7 +183,7 @@ module flexibleServer 'br/public:avm/res/db-for-postgre-sql/flexible-server:<ver
"parameters": {
// Required parameters
"name": {
"value": "dfpsfse001"
"value": "dfpsfsmax001"
},
"skuName": {
"value": "Standard_D2s_v3"
Expand Down Expand Up @@ -233,7 +233,7 @@ module flexibleServer 'br/public:avm/res/db-for-postgre-sql/flexible-server:<ver
using 'br/public:avm/res/db-for-postgre-sql/flexible-server:<version>'
// Required parameters
param name = 'dfpsfse001'
param name = 'dfpsfsmax001'
param skuName = 'Standard_D2s_v3'
param tier = 'GeneralPurpose'
// Non-required parameters
Expand Down Expand Up @@ -1867,15 +1867,13 @@ Custom DNS configurations.

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`fqdn`](#parameter-privateendpointscustomdnsconfigsfqdn) | string | Fqdn that resolves to private endpoint IP address. |
| [`ipAddresses`](#parameter-privateendpointscustomdnsconfigsipaddresses) | array | A list of private IP addresses of the private endpoint. |

### Parameter: `privateEndpoints.customDnsConfigs.fqdn`

Fqdn that resolves to private endpoint IP address.
**Optional parameters**

- Required: No
- Type: string
| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`fqdn`](#parameter-privateendpointscustomdnsconfigsfqdn) | string | FQDN that resolves to private endpoint IP address. |

### Parameter: `privateEndpoints.customDnsConfigs.ipAddresses`

Expand All @@ -1884,6 +1882,13 @@ A list of private IP addresses of the private endpoint.
- Required: Yes
- Type: array

### Parameter: `privateEndpoints.customDnsConfigs.fqdn`

FQDN that resolves to private endpoint IP address.

- Required: No
- Type: string

### Parameter: `privateEndpoints.customNetworkInterfaceName`

The custom name of the network interface attached to the Private Endpoint.
Expand Down Expand Up @@ -2390,7 +2395,7 @@ This section gives you an overview of all local-referenced module files (i.e., o
| Reference | Type |
| :-- | :-- |
| `br/public:avm/res/network/private-endpoint:0.8.0` | Remote reference |
| `br/public:avm/utl/types/avm-common-types:0.1.0` | Remote reference |
| `br/public:avm/utl/types/avm-common-types:0.2.1` | Remote reference |

## Data Collection

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "17167767529180811297"
"version": "0.31.34.60546",
"templateHash": "16481538210870485841"
},
"name": "DBforPostgreSQL Flexible Server Administrators",
"description": "This module deploys a DBforPostgreSQL Flexible Server Administrator.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "11184980891224869481"
"version": "0.31.34.60546",
"templateHash": "4744350024962623928"
},
"name": "DBforPostgreSQL Flexible Server Configurations",
"description": "This module deploys a DBforPostgreSQL Flexible Server Configuration.",
Expand Down Expand Up @@ -54,10 +54,7 @@
"properties": {
"source": "[if(not(empty(parameters('source'))), parameters('source'), null())]",
"value": "[if(not(empty(parameters('value'))), parameters('value'), null())]"
},
"dependsOn": [
"flexibleServer"
]
}
}
},
"outputs": {
Expand Down
9 changes: 3 additions & 6 deletions avm/res/db-for-postgre-sql/flexible-server/database/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "8538777017463575324"
"version": "0.31.34.60546",
"templateHash": "5925943942284222024"
},
"name": "DBforPostgreSQL Flexible Server Databases",
"description": "This module deploys a DBforPostgreSQL Flexible Server Database.",
Expand Down Expand Up @@ -54,10 +54,7 @@
"properties": {
"collation": "[if(not(empty(parameters('collation'))), parameters('collation'), null())]",
"charset": "[if(not(empty(parameters('charset'))), parameters('charset'), null())]"
},
"dependsOn": [
"flexibleServer"
]
}
}
},
"outputs": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "3950185975907365475"
"version": "0.31.34.60546",
"templateHash": "9983440066171652627"
},
"name": "DBforPostgreSQL Flexible Server Firewall Rules",
"description": "This module deploys a DBforPostgreSQL Flexible Server Firewall Rule.",
Expand Down
12 changes: 6 additions & 6 deletions avm/res/db-for-postgre-sql/flexible-server/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ param highAvailability string = 'ZoneRedundant'
@description('Optional. The mode to create a new PostgreSQL server.')
param createMode string = 'Default'

import { managedIdentityOnlyUserAssignedType } from 'br/public:avm/utl/types/avm-common-types:0.1.0'
import { managedIdentityOnlyUserAssignedType } from 'br/public:avm/utl/types/avm-common-types:0.2.1'
@description('Conditional. The managed identity definition for this resource. Required if \'cMKKeyName\' is not empty.')
param managedIdentities managedIdentityOnlyUserAssignedType?

import { customerManagedKeyType } from 'br/public:avm/utl/types/avm-common-types:0.1.0'
import { customerManagedKeyType } from 'br/public:avm/utl/types/avm-common-types:0.2.1'
@description('Optional. The customer managed key definition.')
param customerManagedKey customerManagedKeyType?

Expand Down Expand Up @@ -135,11 +135,11 @@ param databases array = []
@description('Optional. The configurations to create in the server.')
param configurations array = []

import { lockType } from 'br/public:avm/utl/types/avm-common-types:0.1.0'
import { lockType } from 'br/public:avm/utl/types/avm-common-types:0.2.1'
@description('Optional. The lock settings of the service.')
param lock lockType?

import { roleAssignmentType } from 'br/public:avm/utl/types/avm-common-types:0.1.0'
import { roleAssignmentType } from 'br/public:avm/utl/types/avm-common-types:0.2.1'
@description('Optional. Array of role assignments to create.')
param roleAssignments roleAssignmentType[]?

Expand All @@ -149,11 +149,11 @@ param tags object?
@description('Optional. Enable/Disable usage telemetry for module.')
param enableTelemetry bool = true

import { diagnosticSettingFullType } from 'br/public:avm/utl/types/avm-common-types:0.1.0'
import { diagnosticSettingFullType } from 'br/public:avm/utl/types/avm-common-types:0.2.1'
@description('Optional. The diagnostic settings of the service.')
param diagnosticSettings diagnosticSettingFullType[]?

import { privateEndpointSingleServiceType } from 'br/public:avm/utl/types/avm-common-types:0.1.0'
import { privateEndpointSingleServiceType } from 'br/public:avm/utl/types/avm-common-types:0.2.1'
@description('Optional. Configuration details for private endpoints. Used when the desired connectivy mode is \'Public Access\' and \'delegatedSubnetResourceId\' is NOT used.')
param privateEndpoints privateEndpointSingleServiceType[]?

Expand Down
Loading

0 comments on commit ba508c7

Please sign in to comment.