diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 1438bdd4..79b52c9e 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,7 +1,5 @@ -FROM mcr.microsoft.com/powershell:lts-debian-11 +FROM mcr.microsoft.com/powershell:debian-12 -# [Option] Install zsh -ARG INSTALL_ZSH="true" # [Option] Upgrade OS packages to their latest versions ARG UPGRADE_PACKAGES="true" @@ -11,7 +9,7 @@ ARG USER_UID=1000 ARG USER_GID=$USER_UID COPY library-scripts/*.sh /tmp/library-scripts/ RUN apt-get update \ - && /bin/bash /tmp/library-scripts/common-debian.sh "${INSTALL_ZSH}" "${USERNAME}" "${USER_UID}" "${USER_GID}" "${UPGRADE_PACKAGES}" "true" "false" \ + && /bin/bash /tmp/library-scripts/common-debian.sh "false" "${USERNAME}" "${USER_UID}" "${USER_GID}" "${UPGRADE_PACKAGES}" "false" "false" \ && chsh "${USERNAME}" -s "$(which pwsh)" \ && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 2e12f51f..59e89368 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,13 +1,26 @@ { "name": "PowerShell", "dockerFile": "Dockerfile", - // Set *default* container specific settings.json values on container create. - "settings": {}, - // Add the IDs of extensions you want installed when the container is created. - "extensions": [ - "ms-vscode.powershell", - "msazurermtools.azurerm-vscode-tools" - ], + "features": { + "ghcr.io/devcontainers/features/common-utils:2": { + "installTools": true, + "installZsh": true, + "installOhMyZsh": true, + "upgradePackages": true + } + }, + "customizations": { + "vscode": { + // Add the IDs of extensions you want installed when the container is created. + "extensions": [ + "ms-vscode.powershell" + ], + // Set *default* container specific settings.json values on container create. + "settings": { + "terminal.integrated.shell.linux": "/bin/zsh" + } + } + }, // Uncomment the next line to run commands after the container is created. This gets run in bash which is why we call `pwsh`. "postCreateCommand": "pwsh -c './scripts/Dependencies.ps1'", // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. diff --git a/.devcontainer/library-scripts/common-debian.sh b/.devcontainer/library-scripts/common-debian.sh index abea6792..0d69c73c 100644 --- a/.devcontainer/library-scripts/common-debian.sh +++ b/.devcontainer/library-scripts/common-debian.sh @@ -1,20 +1,10 @@ #!/usr/bin/env bash -#------------------------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. -#------------------------------------------------------------------------------------------------------------- -# -# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/common.md -# Maintainer: The VS Code and Codespaces Teams -# -# Syntax: ./common-debian.sh [install zsh flag] [username] [user UID] [user GID] [upgrade packages flag] [install Oh My Zsh! flag] [Add non-free packages] +# Docs: https://github.com/devcontainers/features/blob/main/src/common-utils/README.md -INSTALL_ZSH=${1:-"true"} USERNAME=${2:-"automatic"} USER_UID=${3:-"automatic"} USER_GID=${4:-"automatic"} UPGRADE_PACKAGES=${5:-"true"} -INSTALL_OH_MYS=${6:-"true"} ADD_NON_FREE_PACKAGES=${7:-"false"} set -e @@ -101,7 +91,7 @@ if [ "${PACKAGES_ALREADY_INSTALLED}" != "true" ]; then libkrb5-3 \ libgssapi-krb5-2 \ libicu[0-9][0-9] \ - liblttng-ust0 \ + liblttng-ust1 \ libstdc++6 \ zlib1g \ locales \ @@ -200,206 +190,6 @@ if [ "${USERNAME}" != "root" ] && [ "${EXISTING_NON_ROOT_USER}" != "${USERNAME}" EXISTING_NON_ROOT_USER="${USERNAME}" fi -# ** Shell customization section ** -if [ "${USERNAME}" = "root" ]; then - USER_RC_PATH="/root" -else - USER_RC_PATH="/home/${USERNAME}" -fi - -# .bashrc/.zshrc snippet -RC_SNIPPET="$(cat << 'EOF' - -if [ -z "${USER}" ]; then export USER=$(whoami); fi -if [[ "${PATH}" != *"$HOME/.local/bin"* ]]; then export PATH="${PATH}:$HOME/.local/bin"; fi - -# Display optional first run image specific notice if configured and terminal is interactive -if [ -t 1 ] && [[ "${TERM_PROGRAM}" = "vscode" || "${TERM_PROGRAM}" = "codespaces" ]] && [ ! -f "$HOME/.config/vscode-dev-containers/first-run-notice-already-displayed" ]; then - if [ -f "/usr/local/etc/vscode-dev-containers/first-run-notice.txt" ]; then - cat "/usr/local/etc/vscode-dev-containers/first-run-notice.txt" - elif [ -f "/workspaces/.codespaces/shared/first-run-notice.txt" ]; then - cat "/workspaces/.codespaces/shared/first-run-notice.txt" - fi - mkdir -p "$HOME/.config/vscode-dev-containers" - # Mark first run notice as displayed after 10s to avoid problems with fast terminal refreshes hiding it - ((sleep 10s; touch "$HOME/.config/vscode-dev-containers/first-run-notice-already-displayed") &) -fi - -EOF -)" - -# code shim, it fallbacks to code-insiders if code is not available -cat << 'EOF' > /usr/local/bin/code -#!/bin/sh - -get_in_path_except_current() { - which -a "$1" | grep -A1 "$0" | grep -v "$0" -} - -code="$(get_in_path_except_current code)" - -if [ -n "$code" ]; then - exec "$code" "$@" -elif [ "$(command -v code-insiders)" ]; then - exec code-insiders "$@" -else - echo "code or code-insiders is not installed" >&2 - exit 127 -fi -EOF -chmod +x /usr/local/bin/code - -# systemctl shim - tells people to use 'service' if systemd is not running -cat << 'EOF' > /usr/local/bin/systemctl -#!/bin/sh -set -e -if [ -d "/run/systemd/system" ]; then - exec /bin/systemctl/systemctl "$@" -else - echo '\n"systemd" is not running in this container due to its overhead.\nUse the "service" command to start services intead. e.g.: \n\nservice --status-all' -fi -EOF -chmod +x /usr/local/bin/systemctl - -# Codespaces bash and OMZ themes - partly inspired by https://github.com/ohmyzsh/ohmyzsh/blob/master/themes/robbyrussell.zsh-theme -CODESPACES_BASH="$(cat \ -<<'EOF' - -# Codespaces bash prompt theme -__bash_prompt() { - local userpart='`export XIT=$? \ - && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ - && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' - local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ - if [ "${BRANCH}" != "" ]; then \ - echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ - && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ - echo -n " \[\033[1;33m\]✗"; \ - fi \ - && echo -n "\[\033[0;36m\]) "; \ - fi`' - local lightblue='\[\033[1;34m\]' - local removecolor='\[\033[0m\]' - PS1="${userpart} ${lightblue}\w ${gitbranch}${removecolor}\$ " - unset -f __bash_prompt -} -__bash_prompt - -EOF -)" -CODESPACES_ZSH="$(cat \ -<<'EOF' -__zsh_prompt() { - local prompt_username - if [ ! -z "${GITHUB_USER}" ]; then - prompt_username="@${GITHUB_USER}" - else - prompt_username="%n" - fi - PROMPT="%{$fg[green]%}${prompt_username} %(?:%{$reset_color%}➜ :%{$fg_bold[red]%}➜ )" # User/exit code arrow - PROMPT+='%{$fg_bold[blue]%}%(5~|%-1~/…/%3~|%4~)%{$reset_color%} ' # cwd - PROMPT+='$(git_prompt_info)%{$fg[white]%}$ %{$reset_color%}' # Git status - unset -f __zsh_prompt -} -ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[cyan]%}(%{$fg_bold[red]%}" -ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " -ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg_bold[yellow]%}✗%{$fg_bold[cyan]%})" -ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[cyan]%})" -__zsh_prompt -EOF -)" - -# Add notice that Oh My Bash! has been removed from images and how to provide information on how to install manually -OMB_README="$(cat \ -<<'EOF' -"Oh My Bash!" has been removed from this image in favor of a simple shell prompt. If you -still wish to use it, remove "~/.oh-my-bash" and install it from: https://github.com/ohmybash/oh-my-bash -You may also want to consider "Bash-it" as an alternative: https://github.com/bash-it/bash-it -See here for infomation on adding it to your image or dotfiles: https://aka.ms/codespaces/omb-remove -EOF -)" -OMB_STUB="$(cat \ -<<'EOF' -#!/usr/bin/env bash -if [ -t 1 ]; then - cat $HOME/.oh-my-bash/README.md -fi -EOF -)" - -# Add RC snippet and custom bash prompt -if [ "${RC_SNIPPET_ALREADY_ADDED}" != "true" ]; then - echo "${RC_SNIPPET}" >> /etc/bash.bashrc - echo "${CODESPACES_BASH}" >> "${USER_RC_PATH}/.bashrc" - echo 'export PROMPT_DIRTRIM=4' >> "${USER_RC_PATH}/.bashrc" - if [ "${USERNAME}" != "root" ]; then - echo "${CODESPACES_BASH}" >> "/root/.bashrc" - echo 'export PROMPT_DIRTRIM=4' >> "/root/.bashrc" - fi - chown ${USERNAME}:${USERNAME} "${USER_RC_PATH}/.bashrc" - RC_SNIPPET_ALREADY_ADDED="true" -fi - -# Add stub for Oh My Bash! -if [ ! -d "${USER_RC_PATH}/.oh-my-bash}" ] && [ "${INSTALL_OH_MYS}" = "true" ]; then - mkdir -p "${USER_RC_PATH}/.oh-my-bash" "/root/.oh-my-bash" - echo "${OMB_README}" >> "${USER_RC_PATH}/.oh-my-bash/README.md" - echo "${OMB_STUB}" >> "${USER_RC_PATH}/.oh-my-bash/oh-my-bash.sh" - chmod +x "${USER_RC_PATH}/.oh-my-bash/oh-my-bash.sh" - if [ "${USERNAME}" != "root" ]; then - echo "${OMB_README}" >> "/root/.oh-my-bash/README.md" - echo "${OMB_STUB}" >> "/root/.oh-my-bash/oh-my-bash.sh" - chmod +x "/root/.oh-my-bash/oh-my-bash.sh" - fi - chown -R "${USERNAME}:${USERNAME}" "${USER_RC_PATH}/.oh-my-bash" -fi - -# Optionally install and configure zsh and Oh My Zsh! -if [ "${INSTALL_ZSH}" = "true" ]; then - if ! type zsh > /dev/null 2>&1; then - apt-get-update-if-needed - apt-get install -y zsh - fi - if [ "${ZSH_ALREADY_INSTALLED}" != "true" ]; then - echo "${RC_SNIPPET}" >> /etc/zsh/zshrc - ZSH_ALREADY_INSTALLED="true" - fi - - # Adapted, simplified inline Oh My Zsh! install steps that adds, defaults to a codespaces theme. - # See https://github.com/ohmyzsh/ohmyzsh/blob/master/tools/install.sh for official script. - OH_MY_INSTALL_DIR="${USER_RC_PATH}/.oh-my-zsh" - if [ ! -d "${OH_MY_INSTALL_DIR}" ] && [ "${INSTALL_OH_MYS}" = "true" ]; then - TEMPLATE_PATH="${OH_MY_INSTALL_DIR}/templates/zshrc.zsh-template" - USER_RC_FILE="${USER_RC_PATH}/.zshrc" - umask g-w,o-w - mkdir -p ${OH_MY_INSTALL_DIR} - git clone --depth=1 \ - -c core.eol=lf \ - -c core.autocrlf=false \ - -c fsck.zeroPaddedFilemode=ignore \ - -c fetch.fsck.zeroPaddedFilemode=ignore \ - -c receive.fsck.zeroPaddedFilemode=ignore \ - "https://github.com/ohmyzsh/ohmyzsh" "${OH_MY_INSTALL_DIR}" 2>&1 - echo -e "$(cat "${TEMPLATE_PATH}")\nDISABLE_AUTO_UPDATE=true\nDISABLE_UPDATE_PROMPT=true" > ${USER_RC_FILE} - sed -i -e 's/ZSH_THEME=.*/ZSH_THEME="codespaces"/g' ${USER_RC_FILE} - - mkdir -p ${OH_MY_INSTALL_DIR}/custom/themes - echo "${CODESPACES_ZSH}" > "${OH_MY_INSTALL_DIR}/custom/themes/codespaces.zsh-theme" - # Shrink git while still enabling updates - cd "${OH_MY_INSTALL_DIR}" - git repack -a -d -f --depth=1 --window=1 - # Copy to non-root user if one is specified - if [ "${USERNAME}" != "root" ]; then - cp -rf "${USER_RC_FILE}" "${OH_MY_INSTALL_DIR}" /root - chown -R ${USERNAME}:${USERNAME} "${USER_RC_PATH}" - fi - fi -fi - # Persist image metadata info, script if meta.env found in same directory META_INFO_SCRIPT="$(cat << 'EOF' #!/bin/sh @@ -444,8 +234,6 @@ mkdir -p "$(dirname "${MARKER_FILE}")" echo -e "\ PACKAGES_ALREADY_INSTALLED=${PACKAGES_ALREADY_INSTALLED}\n\ LOCALE_ALREADY_SET=${LOCALE_ALREADY_SET}\n\ - EXISTING_NON_ROOT_USER=${EXISTING_NON_ROOT_USER}\n\ - RC_SNIPPET_ALREADY_ADDED=${RC_SNIPPET_ALREADY_ADDED}\n\ - ZSH_ALREADY_INSTALLED=${ZSH_ALREADY_INSTALLED}" > "${MARKER_FILE}" + EXISTING_NON_ROOT_USER=${EXISTING_NON_ROOT_USER}" > "${MARKER_FILE}" echo "Done!" \ No newline at end of file diff --git a/src/AzOps.psd1 b/src/AzOps.psd1 index 7dba2a4e..ac3811ec 100644 --- a/src/AzOps.psd1 +++ b/src/AzOps.psd1 @@ -3,7 +3,7 @@ # # Generated by: Customer Architecture Team (CAT) # -# Generated on: 12/17/2024 +# Generated on: 3/7/2025 # @{ @@ -52,10 +52,10 @@ PowerShellVersion = '7.2' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ModuleName = 'PSFramework'; RequiredVersion = '1.12.346'; }, - @{ModuleName = 'Az.Accounts'; RequiredVersion = '4.0.0'; }, - @{ModuleName = 'Az.Billing'; RequiredVersion = '2.1.0'; }, - @{ModuleName = 'Az.ResourceGraph'; RequiredVersion = '1.0.1'; }, - @{ModuleName = 'Az.Resources'; RequiredVersion = '7.6.0'; }) + @{ModuleName = 'Az.Accounts'; RequiredVersion = '4.0.2'; }, + @{ModuleName = 'Az.Billing'; RequiredVersion = '2.2.0'; }, + @{ModuleName = 'Az.ResourceGraph'; RequiredVersion = '1.2.0'; }, + @{ModuleName = 'Az.Resources'; RequiredVersion = '7.9.0'; }) # Assemblies that must be loaded prior to importing this module # RequiredAssemblies = @() diff --git a/src/data/template/Microsoft.Management/managementGroups.template.jq b/src/data/template/Microsoft.Management/managementGroups.template.jq index 7b9d6705..01cb2dbc 100644 --- a/src/data/template/Microsoft.Management/managementGroups.template.jq +++ b/src/data/template/Microsoft.Management/managementGroups.template.jq @@ -8,7 +8,7 @@ then then { "type": "Microsoft.Management/managementGroups", - "apiVersion": "2020-05-01", + "apiVersion": "2023-04-01", "name": $item.Name, "scope": "/", "properties": { @@ -24,7 +24,7 @@ then then { "type": "Microsoft.Management/managementGroups/subscriptions", - "apiVersion": "2021-04-01", + "apiVersion": "2023-04-01", "name": ($input.Name + "/" + $item.Name), "scope": "/" } @@ -64,7 +64,7 @@ end }, { "type": "Microsoft.Resources/deployments", - "apiVersion": "2020-10-01", + "apiVersion": "2024-11-01", "name": "AzOps-microsoft.management_managementgroups-nested", "location": "[deployment().location]", "properties": { diff --git a/src/localized/en-us/Strings.psd1 b/src/localized/en-us/Strings.psd1 index a1e3628a..94b40912 100644 --- a/src/localized/en-us/Strings.psd1 +++ b/src/localized/en-us/Strings.psd1 @@ -330,6 +330,6 @@ 'Set-AzOpsWhatIfOutput.WhatIfFileAdding' = 'Adding content to WhatIf {0} file for template {1} with parameter file {2}' # '', $FilePath, $ParameterFilePath 'Set-AzOpsWhatIfOutput.WhatIfFileMax' = 'WhatIf markdown and json files have reached character limit, unable to append more information to files. WhatIf is too large for comment field, for more details look at PR files to determine changes.' # $ResultSizeMaxLimit, $ResultSizeLimit 'Set-AzOpsWhatIfOutput.WhatIfMessageMax' = 'WhatIf have reached maximum character limit, unable to append warning message. WhatIf is too large for comment field, for more details look at PR files to determine changes.' # $ResultSizeMaxLimit, $ResultSizeLimit - 'Set-AzOpsWhatIfOutput.WhatIfResults' = 'WhatIf Output {0}' # $results + 'Set-AzOpsWhatIfOutput.WhatIfResults' = 'WhatIf Output {0}' # $results or $allResults 'Set-AzOpsWhatIfOutput.WhatIfFile.Remove' = 'Removing WhatIf markdown and json files lingering from previous run' # } \ No newline at end of file diff --git a/src/tests/functional/Microsoft.Authorization/policyAssignments/deploy/deploy.bicep b/src/tests/functional/Microsoft.Authorization/policyAssignments/deploy/deploy.bicep index 4c454aee..25922601 100644 --- a/src/tests/functional/Microsoft.Authorization/policyAssignments/deploy/deploy.bicep +++ b/src/tests/functional/Microsoft.Authorization/policyAssignments/deploy/deploy.bicep @@ -3,7 +3,7 @@ param policyDefinitionID string = '/providers/Microsoft.Authorization/policyDefi targetScope = 'resourceGroup' -resource assignment 'Microsoft.Authorization/policyAssignments@2021-06-01' = { +resource assignment 'Microsoft.Authorization/policyAssignments@2025-01-01' = { name: policyAssignmentName properties: { policyDefinitionId: policyDefinitionID diff --git a/src/tests/functional/Microsoft.Authorization/roleAssignments/deploy/deploy.bicep b/src/tests/functional/Microsoft.Authorization/roleAssignments/deploy/deploy.bicep index 62f1e5b9..1448f73f 100644 --- a/src/tests/functional/Microsoft.Authorization/roleAssignments/deploy/deploy.bicep +++ b/src/tests/functional/Microsoft.Authorization/roleAssignments/deploy/deploy.bicep @@ -4,11 +4,11 @@ param principalId string = '4dacdaa1-2044-490c-a603-36f80b6aaa0c' targetScope = 'subscription' @description('This is the built-in Reader role. See https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#reader') -resource readerRoleDefinition 'Microsoft.Authorization/roleDefinitions@2018-01-01-preview' existing = { +resource readerRoleDefinition 'Microsoft.Authorization/roleDefinitions@2022-05-01-preview' existing = { name: roleDefinitionResourceId } -resource roleAssignment 'Microsoft.Authorization/roleAssignments@2020-10-01-preview' = { +resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = { name: guid(subscription().id, principalId, roleDefinitionResourceId) properties: { roleDefinitionId: readerRoleDefinition.id diff --git a/src/tests/functional/Microsoft.Compute/virtualMachines/deploy/deploy.json b/src/tests/functional/Microsoft.Compute/virtualMachines/deploy/deploy.json index 1572e690..fad40e34 100644 --- a/src/tests/functional/Microsoft.Compute/virtualMachines/deploy/deploy.json +++ b/src/tests/functional/Microsoft.Compute/virtualMachines/deploy/deploy.json @@ -70,7 +70,7 @@ { "name": "[parameters('networkInterfaceName')]", "type": "Microsoft.Network/networkInterfaces", - "apiVersion": "2021-03-01", + "apiVersion": "2024-05-01", "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', parameters('networkSecurityGroupName'))]", @@ -96,7 +96,7 @@ { "name": "[parameters('networkSecurityGroupName')]", "type": "Microsoft.Network/networkSecurityGroups", - "apiVersion": "2019-02-01", + "apiVersion": "2024-05-01", "location": "[parameters('location')]", "properties": { "securityRules": "[parameters('networkSecurityGroupRules')]" @@ -105,7 +105,7 @@ { "name": "[parameters('virtualNetworkName')]", "type": "Microsoft.Network/virtualNetworks", - "apiVersion": "2020-11-01", + "apiVersion": "2024-05-01", "location": "[parameters('location')]", "properties": { "addressSpace": { @@ -117,7 +117,7 @@ { "name": "[parameters('virtualMachineName')]", "type": "Microsoft.Compute/virtualMachines", - "apiVersion": "2021-07-01", + "apiVersion": "2024-07-01", "location": "[parameters('location')]", "zones": "[parameters('zone')]", "dependsOn": [ diff --git a/src/tests/functional/Microsoft.Insights/activityLogAlerts/deploy/deploy.json b/src/tests/functional/Microsoft.Insights/activityLogAlerts/deploy/deploy.json index 006e6388..1a237666 100644 --- a/src/tests/functional/Microsoft.Insights/activityLogAlerts/deploy/deploy.json +++ b/src/tests/functional/Microsoft.Insights/activityLogAlerts/deploy/deploy.json @@ -65,7 +65,7 @@ { "name": "[parameters('actionGroupName')]", "type": "microsoft.insights/actionGroups", - "apiVersion": "2019-06-01", + "apiVersion": "2023-01-01", "location": "[parameters('location')]", "properties": { "groupShortName": "[parameters('groupShortName')]", diff --git a/src/tests/functional/Microsoft.KeyVault/vaults/deploy/deploy.bicep b/src/tests/functional/Microsoft.KeyVault/vaults/deploy/deploy.bicep index 82887672..922aee72 100644 --- a/src/tests/functional/Microsoft.KeyVault/vaults/deploy/deploy.bicep +++ b/src/tests/functional/Microsoft.KeyVault/vaults/deploy/deploy.bicep @@ -1,7 +1,7 @@ param vaultName string = 'kvazopstest${uniqueString(resourceGroup().id)}' param location string = resourceGroup().location -resource key_vault 'Microsoft.KeyVault/vaults@2019-09-01' = { +resource key_vault 'Microsoft.KeyVault/vaults@2024-11-01' = { name: vaultName location: location properties: { diff --git a/src/tests/functional/Microsoft.Logic/workflows/deploy/deploy.json b/src/tests/functional/Microsoft.Logic/workflows/deploy/deploy.json index 0a952e3c..7b8afed5 100644 --- a/src/tests/functional/Microsoft.Logic/workflows/deploy/deploy.json +++ b/src/tests/functional/Microsoft.Logic/workflows/deploy/deploy.json @@ -65,7 +65,7 @@ }, { "type": "Microsoft.Storage/storageAccounts", - "apiVersion": "2019-04-01", + "apiVersion": "2024-01-01", "name": "[parameters('storageAccountName')]", "location": "[parameters('location')]", "sku": { diff --git a/src/tests/functional/Microsoft.ManagedIdentity/userAssignedIdentities/deploy/deploy.json b/src/tests/functional/Microsoft.ManagedIdentity/userAssignedIdentities/deploy/deploy.json index ecce1458..5656bd13 100644 --- a/src/tests/functional/Microsoft.ManagedIdentity/userAssignedIdentities/deploy/deploy.json +++ b/src/tests/functional/Microsoft.ManagedIdentity/userAssignedIdentities/deploy/deploy.json @@ -21,7 +21,7 @@ { "type": "Microsoft.ManagedIdentity/userAssignedIdentities", "name": "[parameters('userMsiName')]", - "apiVersion": "2018-11-30", + "apiVersion": "2024-11-30", "location": "[parameters('location')]" } ] diff --git a/src/tests/functional/Microsoft.Management/managementGroups/deploy/deploy.bicep b/src/tests/functional/Microsoft.Management/managementGroups/deploy/deploy.bicep index c243876c..301537a1 100644 --- a/src/tests/functional/Microsoft.Management/managementGroups/deploy/deploy.bicep +++ b/src/tests/functional/Microsoft.Management/managementGroups/deploy/deploy.bicep @@ -3,7 +3,7 @@ param managementGroupId string = 'AzOpsMGMTID' targetScope = 'tenant' -resource managementGroup 'Microsoft.Management/managementGroups@2021-04-01' = { +resource managementGroup 'Microsoft.Management/managementGroups@2023-04-01' = { name: managementGroupId properties: { displayName: managementGroupName diff --git a/src/tests/functional/Microsoft.Network/azureFirewalls/deploy/deploy.json b/src/tests/functional/Microsoft.Network/azureFirewalls/deploy/deploy.json index 84ec1d99..bb90877a 100644 --- a/src/tests/functional/Microsoft.Network/azureFirewalls/deploy/deploy.json +++ b/src/tests/functional/Microsoft.Network/azureFirewalls/deploy/deploy.json @@ -29,7 +29,7 @@ }, "resources": [ { - "apiVersion": "2021-05-01", + "apiVersion": "2024-05-01", "type": "Microsoft.Network/publicIpAddresses", "name": "[parameters('publicIpAddressName')]", "location": "[parameters('location')]", @@ -46,7 +46,7 @@ "type": "Microsoft.Network/virtualNetworks", "name": "[parameters('vnetName')]", "location": "[parameters('location')]", - "apiVersion": "2021-05-01", + "apiVersion": "2024-05-01", "properties": { "addressSpace": { "addressPrefixes": [ @@ -65,7 +65,7 @@ "tags": {} }, { - "apiVersion": "2021-05-01", + "apiVersion": "2024-05-01", "type": "Microsoft.Network/firewallPolicies", "resources": [], "properties": { @@ -81,7 +81,7 @@ "tags": {} }, { - "apiVersion": "2021-05-01", + "apiVersion": "2024-05-01", "type": "Microsoft.Network/azureFirewalls", "name": "[parameters('azureFirewallName')]", "location": "[parameters('location')]", diff --git a/src/tests/functional/Microsoft.Network/bastionHosts/deploy/deploy.json b/src/tests/functional/Microsoft.Network/bastionHosts/deploy/deploy.json index 1354bdb3..da4db69b 100644 --- a/src/tests/functional/Microsoft.Network/bastionHosts/deploy/deploy.json +++ b/src/tests/functional/Microsoft.Network/bastionHosts/deploy/deploy.json @@ -61,7 +61,7 @@ { "name": "[parameters('virtualNetworkName')]", "type": "Microsoft.Network/VirtualNetworks", - "apiVersion": "2021-01-01", + "apiVersion": "2024-05-01", "location": "[parameters('location')]", "dependsOn": [], "tags": {}, @@ -82,7 +82,7 @@ }, { "type": "Microsoft.Network/publicIPAddresses", - "apiVersion": "2020-08-01", + "apiVersion": "2024-05-01", "name": "[variables('azureBastionPipName')]", "location": "[parameters('location')]", "sku": { @@ -97,7 +97,7 @@ { "type": "Microsoft.Network/bastionHosts", "name": "[parameters('azureBastionName')]", - "apiVersion": "2020-08-01", + "apiVersion": "2024-05-01", "location": "[parameters('location')]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('azureBastionPipName'))]", diff --git a/src/tests/functional/Microsoft.Network/connections/deploy/deploy.json b/src/tests/functional/Microsoft.Network/connections/deploy/deploy.json index 60868f03..9dde293a 100644 --- a/src/tests/functional/Microsoft.Network/connections/deploy/deploy.json +++ b/src/tests/functional/Microsoft.Network/connections/deploy/deploy.json @@ -22,7 +22,7 @@ "resources": [ { "type": "Microsoft.Network/localNetworkGateways", - "apiVersion": "2020-11-01", + "apiVersion": "2024-05-01", "name": "[parameters('localNetworkGatewayName')]", "location": "northeurope", "properties": { @@ -36,7 +36,7 @@ }, { "type": "Microsoft.Network/publicIPAddresses", - "apiVersion": "2020-11-01", + "apiVersion": "2024-05-01", "name": "[parameters('publicIPAddressesName')]", "location": "northeurope", "sku": { @@ -57,7 +57,7 @@ }, { "type": "Microsoft.Network/virtualNetworks", - "apiVersion": "2020-11-01", + "apiVersion": "2024-05-01", "name": "[parameters('virtualNetworkName')]", "location": "northeurope", "properties": { @@ -83,7 +83,7 @@ }, { "type": "Microsoft.Network/virtualNetworks/subnets", - "apiVersion": "2020-11-01", + "apiVersion": "2024-05-01", "name": "[concat(parameters('virtualNetworkName'), '/GatewaySubnet')]", "dependsOn": [ "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]" @@ -97,7 +97,7 @@ }, { "type": "Microsoft.Network/connections", - "apiVersion": "2020-11-01", + "apiVersion": "2024-05-01", "name": "[parameters('connectionName')]", "location": "northeurope", "dependsOn": [ @@ -127,7 +127,7 @@ }, { "type": "Microsoft.Network/virtualNetworkGateways", - "apiVersion": "2020-11-01", + "apiVersion": "2024-05-01", "name": "[parameters('virtualNetworkGatewayName')]", "location": "northeurope", "dependsOn": [ diff --git a/src/tests/functional/Microsoft.Network/localNetworkGateways/deploy/deploy.json b/src/tests/functional/Microsoft.Network/localNetworkGateways/deploy/deploy.json index 600e08f8..85ceb1f1 100644 --- a/src/tests/functional/Microsoft.Network/localNetworkGateways/deploy/deploy.json +++ b/src/tests/functional/Microsoft.Network/localNetworkGateways/deploy/deploy.json @@ -32,7 +32,7 @@ "resources": [ { "type": "Microsoft.Network/localNetworkGateways", - "apiVersion": "2020-08-01", + "apiVersion": "2024-05-01", "name": "[parameters('localNetworkGatewayName')]", "location": "[parameters('location')]", "properties": { diff --git a/src/tests/functional/Microsoft.Network/networkInterfaces/deploy/deploy.json b/src/tests/functional/Microsoft.Network/networkInterfaces/deploy/deploy.json index 35568b5a..c6af2aef 100644 --- a/src/tests/functional/Microsoft.Network/networkInterfaces/deploy/deploy.json +++ b/src/tests/functional/Microsoft.Network/networkInterfaces/deploy/deploy.json @@ -29,7 +29,7 @@ { "name": "[parameters('virtualNetworkName')]", "type": "Microsoft.Network/VirtualNetworks", - "apiVersion": "2021-01-01", + "apiVersion": "2024-05-01", "location": "[parameters('location')]", "dependsOn": [], "tags": {}, @@ -51,7 +51,7 @@ { "name": "[parameters('nic0_name')]", "type": "Microsoft.Network/networkInterfaces", - "apiVersion": "2020-11-01", + "apiVersion": "2024-05-01", "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/VirtualNetworks/', parameters('virtualNetworkName'))]" diff --git a/src/tests/functional/Microsoft.Network/networkSecurityGroups/deploy/deploy.json b/src/tests/functional/Microsoft.Network/networkSecurityGroups/deploy/deploy.json index 84703db6..74099ce3 100644 --- a/src/tests/functional/Microsoft.Network/networkSecurityGroups/deploy/deploy.json +++ b/src/tests/functional/Microsoft.Network/networkSecurityGroups/deploy/deploy.json @@ -13,7 +13,7 @@ "resources": [ { "type": "Microsoft.Network/networkSecurityGroups", - "apiVersion": "2021-05-01", + "apiVersion": "2024-05-01", "name": "[parameters('networkSecurityGroupName')]", "location": "[parameters('location')]" } diff --git a/src/tests/functional/Microsoft.Network/privateDnsZones/deploy/deploy.json b/src/tests/functional/Microsoft.Network/privateDnsZones/deploy/deploy.json index d7a65ba8..527cb9b5 100644 --- a/src/tests/functional/Microsoft.Network/privateDnsZones/deploy/deploy.json +++ b/src/tests/functional/Microsoft.Network/privateDnsZones/deploy/deploy.json @@ -20,7 +20,7 @@ "resources": [ { "type": "Microsoft.Network/privateDnsZones", - "apiVersion": "2018-09-01", + "apiVersion": "2024-06-01", "name": "[parameters('privateDnsZoneName')]", "location": "[parameters('location')]" } diff --git a/src/tests/functional/Microsoft.Network/privateEndpoints/deploy/deploy.json b/src/tests/functional/Microsoft.Network/privateEndpoints/deploy/deploy.json index 535b60ca..d7a6d264 100644 --- a/src/tests/functional/Microsoft.Network/privateEndpoints/deploy/deploy.json +++ b/src/tests/functional/Microsoft.Network/privateEndpoints/deploy/deploy.json @@ -52,7 +52,7 @@ "resources": [ { "type": "Microsoft.KeyVault/vaults", - "apiVersion": "2019-09-01", + "apiVersion": "2024-11-01", "name": "[parameters('keyVaultName')]", "location": "[parameters('location')]", "properties": { @@ -67,7 +67,7 @@ { "name": "[parameters('virtualNetworkName')]", "type": "Microsoft.Network/VirtualNetworks", - "apiVersion": "2021-01-01", + "apiVersion": "2024-05-01", "location": "[parameters('location')]", "dependsOn": [], "properties": { @@ -87,7 +87,7 @@ }, { "type": "Microsoft.Network/privateEndpoints", - "apiVersion": "2020-07-01", + "apiVersion": "2024-05-01", "name": "[parameters('privateEndpointName')]", "location": "[parameters('location')]", "dependsOn":[ diff --git a/src/tests/functional/Microsoft.Network/publicIPAddresses/deploy/deploy.json b/src/tests/functional/Microsoft.Network/publicIPAddresses/deploy/deploy.json index 333194a2..4732a09c 100644 --- a/src/tests/functional/Microsoft.Network/publicIPAddresses/deploy/deploy.json +++ b/src/tests/functional/Microsoft.Network/publicIPAddresses/deploy/deploy.json @@ -11,7 +11,7 @@ }, "resources": [ { - "apiVersion": "2021-05-01", + "apiVersion": "2024-05-01", "type": "Microsoft.Network/publicIpAddresses", "name": "[parameters('publicIpAddressName')]", "location": "[parameters('location')]", diff --git a/src/tests/functional/Microsoft.Network/routeTables/deploy/deploy.json b/src/tests/functional/Microsoft.Network/routeTables/deploy/deploy.json index 0aa643dc..fea28caf 100644 --- a/src/tests/functional/Microsoft.Network/routeTables/deploy/deploy.json +++ b/src/tests/functional/Microsoft.Network/routeTables/deploy/deploy.json @@ -18,7 +18,7 @@ "variables": {}, "resources": [{ "type": "Microsoft.Network/routeTables", - "apiVersion": "2019-02-01", + "apiVersion": "2024-05-01", "name": "[parameters('routeTableName')]", "location": "[parameters('location')]", "properties": { diff --git a/src/tests/functional/Microsoft.Network/virtualNetworks/deploy/deploy.json b/src/tests/functional/Microsoft.Network/virtualNetworks/deploy/deploy.json index 35568b5a..c6af2aef 100644 --- a/src/tests/functional/Microsoft.Network/virtualNetworks/deploy/deploy.json +++ b/src/tests/functional/Microsoft.Network/virtualNetworks/deploy/deploy.json @@ -29,7 +29,7 @@ { "name": "[parameters('virtualNetworkName')]", "type": "Microsoft.Network/VirtualNetworks", - "apiVersion": "2021-01-01", + "apiVersion": "2024-05-01", "location": "[parameters('location')]", "dependsOn": [], "tags": {}, @@ -51,7 +51,7 @@ { "name": "[parameters('nic0_name')]", "type": "Microsoft.Network/networkInterfaces", - "apiVersion": "2020-11-01", + "apiVersion": "2024-05-01", "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Network/VirtualNetworks/', parameters('virtualNetworkName'))]" diff --git a/src/tests/functional/Microsoft.Resources/resourceGroups/deploy/deploy.bicep b/src/tests/functional/Microsoft.Resources/resourceGroups/deploy/deploy.bicep index c83ee9df..b98db7e4 100644 --- a/src/tests/functional/Microsoft.Resources/resourceGroups/deploy/deploy.bicep +++ b/src/tests/functional/Microsoft.Resources/resourceGroups/deploy/deploy.bicep @@ -2,7 +2,7 @@ param rgName string = 'resourceGroups-azopsrg' param location string = 'northeurope' targetScope = 'subscription' -resource symbolicname 'Microsoft.Resources/resourceGroups@2021-04-01' = { +resource symbolicname 'Microsoft.Resources/resourceGroups@2024-11-01' = { name: rgName location: location } diff --git a/src/tests/functional/Microsoft.Storage/storageAccounts/deploy/deploy.bicep b/src/tests/functional/Microsoft.Storage/storageAccounts/deploy/deploy.bicep index 64744af7..b66d0cf7 100644 --- a/src/tests/functional/Microsoft.Storage/storageAccounts/deploy/deploy.bicep +++ b/src/tests/functional/Microsoft.Storage/storageAccounts/deploy/deploy.bicep @@ -1,7 +1,7 @@ param staName string = 'staazops${uniqueString(resourceGroup().id)}' param location string = resourceGroup().location -resource storage_resource 'Microsoft.Storage/storageAccounts@2021-08-01' = { +resource storage_resource 'Microsoft.Storage/storageAccounts@2024-01-01' = { name: staName location: location kind: 'StorageV2' diff --git a/src/tests/functional/Microsoft.Web/serverfarms/deploy/deploy.bicep b/src/tests/functional/Microsoft.Web/serverfarms/deploy/deploy.bicep index cf5cfd27..5dfb1903 100644 --- a/src/tests/functional/Microsoft.Web/serverfarms/deploy/deploy.bicep +++ b/src/tests/functional/Microsoft.Web/serverfarms/deploy/deploy.bicep @@ -2,7 +2,7 @@ param appServicePlanName string = uniqueString(resourceGroup().id) param sku string = 'S1' param location string = resourceGroup().location -resource appServicePlan 'Microsoft.Web/serverfarms@2021-03-01' = { +resource appServicePlan 'Microsoft.Web/serverfarms@2024-04-01' = { name: appServicePlanName location: location properties: { diff --git a/src/tests/functional/Microsoft.Web/sites/deploy/deploy.bicep b/src/tests/functional/Microsoft.Web/sites/deploy/deploy.bicep index 8ba12417..30bbb892 100644 --- a/src/tests/functional/Microsoft.Web/sites/deploy/deploy.bicep +++ b/src/tests/functional/Microsoft.Web/sites/deploy/deploy.bicep @@ -6,7 +6,7 @@ param location string = resourceGroup().location var appServicePlanName = toLower('AppServicePlan-${webAppName}') var webSiteName = toLower('azapp-${webAppName}') -resource appServicePlan 'Microsoft.Web/serverfarms@2021-03-01' = { +resource appServicePlan 'Microsoft.Web/serverfarms@2024-04-01' = { name: appServicePlanName location: location properties: { @@ -17,7 +17,7 @@ resource appServicePlan 'Microsoft.Web/serverfarms@2021-03-01' = { } kind: 'linux' } -resource appService 'Microsoft.Web/sites@2021-03-01' = { +resource appService 'Microsoft.Web/sites@2024-04-01' = { name: webSiteName location: location properties: { diff --git a/src/tests/templates/azuredeploy.jsonc b/src/tests/templates/azuredeploy.jsonc index 54a60321..6deeffaa 100644 --- a/src/tests/templates/azuredeploy.jsonc +++ b/src/tests/templates/azuredeploy.jsonc @@ -36,7 +36,7 @@ // Policy Definition and SetDefinition - Test Root { "type": "Microsoft.Resources/deployments", - "apiVersion": "2020-10-01", + "apiVersion": "2024-11-01", "name": "Test-Policy-Definition-Nested", "location": "northeurope", "dependsOn": [ @@ -50,7 +50,7 @@ "resources": [ { "type": "Microsoft.Authorization/policyDefinitions", - "apiVersion": "2021-06-01", + "apiVersion": "2025-01-01", "name": "TestPolicyDefinition", "properties": { "displayName": "AzOps - Deploy network watcher when virtual networks are created", @@ -107,7 +107,7 @@ }, { "type": "Microsoft.Authorization/policySetDefinitions", - "apiVersion": "2021-06-01", + "apiVersion": "2025-01-01", "name": "TestPolicySetDefinition", "properties": { "displayName": "AzOps - Flow logs should be configured and enabled for every network security group", @@ -143,7 +143,7 @@ }, { "type": "Microsoft.Authorization/policyDefinitions", - "apiVersion": "2021-06-01", + "apiVersion": "2025-01-01", "name": "TestPolicyDefinitionDep", "properties": { "displayName": "AzOpsDep - Deploy network watcher when virtual networks are created", @@ -200,7 +200,7 @@ }, { "type": "Microsoft.Authorization/policyAssignments", - "apiVersion": "2021-06-01", + "apiVersion": "2025-01-01", "name": "TestPolicyAssignmentDep", "location": "westeurope", "identity": { @@ -215,7 +215,7 @@ }, { "type": "Microsoft.Authorization/policySetDefinitions", - "apiVersion": "2021-06-01", + "apiVersion": "2025-01-01", "name": "TestPolicySetDefinitionDep", "properties": { "displayName": "AzOpsDep - Flow logs should be configured and enabled for every network security group", @@ -251,7 +251,7 @@ }, { "type": "Microsoft.Authorization/policyAssignments", - "apiVersion": "2021-06-01", + "apiVersion": "2025-01-01", "name": "TestPolicyAssDepDef", "properties": { "policyDefinitionId": "[concat('/providers/Microsoft.Management/managementGroups/', guid('Test'), '/providers/Microsoft.Authorization/policySetDefinitions/TestPolicySetDefinitionDep')]" @@ -262,7 +262,7 @@ }, { "type": "Microsoft.Authorization/policyDefinitions", - "apiVersion": "2021-06-01", + "apiVersion": "2025-01-01", "name": "TestPolicyDefinitionDe2", "properties": { "displayName": "AzOpsDep2 - Deploy network watcher when virtual networks are created", @@ -319,7 +319,7 @@ }, { "type": "Microsoft.Authorization/policySetDefinitions", - "apiVersion": "2021-06-01", + "apiVersion": "2025-01-01", "name": "TestPolicySetDefinitionDe2", "dependsOn": [ "TestPolicyDefinitionDe2" @@ -403,7 +403,7 @@ // Policy Assignment - Test - Platform - Management { "type": "Microsoft.Resources/deployments", - "apiVersion": "2020-10-01", + "apiVersion": "2024-11-01", "name": "Test-Policy-Assignment-Nested", "location": "northeurope", "dependsOn": [ @@ -417,7 +417,7 @@ "resources": [ { "type": "Microsoft.Authorization/policyAssignments", - "apiVersion": "2021-06-01", + "apiVersion": "2025-01-01", "name": "TestPolicyAssignment", "properties": { "metadata": { @@ -435,7 +435,7 @@ // Empty 'delay' deployments to ensure roleAssignments have been replicated before submitting subscription deployments { "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", + "apiVersion": "2024-11-01", "name": "[concat('delayFor', copyIndex())]", "location": "[deployment().location]", "scope": "/", @@ -462,7 +462,7 @@ // Subscription - Test - Platform - Management - Subscription-0 { "type": "Microsoft.Resources/deployments", - "apiVersion": "2020-10-01", + "apiVersion": "2024-11-01", "name": "AzOps-Test-Move-Subscription", "location": "northeurope", "dependsOn": [ @@ -485,17 +485,47 @@ }, "scope": "/" }, + // Empty 'delay' deployments to ensure subscription move and policy assignment have been replicated before submitting subscription deployments + { + "type": "Microsoft.Resources/deployments", + "apiVersion": "2024-11-01", + "name": "[concat('delayForMore', copyIndex())]", + "location": "[deployment().location]", + "scope": "/", + "dependsOn": [ + "[resourceId('Microsoft.Resources/deployments', 'Test-Policy-Assignment-Nested')]", + "[resourceId('Microsoft.Resources/deployments', 'AzOps-Test-Move-Subscription')]", + "waitingCompletion" + ], + "copy": { + "batchSize": 1, + "count": 10, + "mode": "Serial", + "name": "waitingCompletionAdditional" + }, + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2019-08-01/managementGroupDeploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": {}, + "resources": [], + "outputs": {} + } + } + }, // Resource Group, Role Assignment, Policy Exemption and Route Table - Test - Platform - Management - Subscription-0 - App1-azopsrg { "type": "Microsoft.Resources/deployments", - "apiVersion": "2020-10-01", + "apiVersion": "2024-11-01", "name": "AzOps-Tests-Nested", "subscriptionId": "[parameters('subscriptionId')]", "location": "northeurope", "dependsOn": [ "[resourceId('Microsoft.Resources/deployments', 'Test-Policy-Assignment-Nested')]", "[resourceId('Microsoft.Resources/deployments', 'AzOps-Test-Move-Subscription')]", - "waitingCompletion" + "waitingCompletion", + "waitingCompletionAdditional" ], "properties": { "mode": "Incremental", @@ -505,43 +535,43 @@ "resources": [ { "type": "Microsoft.Resources/resourceGroups", - "apiVersion": "2019-10-01", + "apiVersion": "2024-11-01", "name": "App1-azopsrg", "location": "northeurope" }, { "type": "Microsoft.Resources/resourceGroups", - "apiVersion": "2019-10-01", + "apiVersion": "2024-11-01", "name": "RemovalSupport-azopsrg", "location": "northeurope" }, { "type": "Microsoft.Resources/resourceGroups", - "apiVersion": "2019-10-01", + "apiVersion": "2024-11-01", "name": "CustomDeletion-azopsrg", "location": "northeurope" }, { "type": "Microsoft.Resources/resourceGroups", - "apiVersion": "2019-10-01", + "apiVersion": "2024-11-01", "name": "Lock1-azopsrg", "location": "northeurope" }, { "type": "Microsoft.Resources/resourceGroups", - "apiVersion": "2019-10-01", + "apiVersion": "2024-11-01", "name": "Lock2-azopsrg", "location": "northeurope" }, { "type": "Microsoft.Resources/resourceGroups", - "apiVersion": "2019-10-01", + "apiVersion": "2024-11-01", "name": "ParallelDeploy-azopsrg", "location": "northeurope" }, { "type": "Microsoft.Authorization/roleAssignments", - "apiVersion": "2021-04-01-preview", + "apiVersion": "2022-04-01", "name": "[guid('RoleAssignmentTest')]", "properties": { "roleDefinitionId": "[concat('/subscriptions/', parameters('subscriptionId'), '/providers/Microsoft.Authorization/roleDefinitions/', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]", @@ -564,7 +594,7 @@ }, { "type": "Microsoft.Resources/deployments", - "apiVersion": "2019-10-01", + "apiVersion": "2024-11-01", "name": "RouteTableAndPolicy", "resourceGroup": "App1-azopsrg", "dependsOn": [ @@ -629,7 +659,7 @@ }, { "type": "Microsoft.Resources/deployments", - "apiVersion": "2019-10-01", + "apiVersion": "2024-11-01", "name": "RemovalRGSupportDeploy", "resourceGroup": "RemovalSupport-azopsrg", "dependsOn": [ @@ -661,7 +691,7 @@ }, { "type": "Microsoft.Resources/deployments", - "apiVersion": "2019-10-01", + "apiVersion": "2024-11-01", "name": "CustomDeletion", "resourceGroup": "CustomDeletion-azopsrg", "dependsOn": [ @@ -678,7 +708,7 @@ "resources": [ { "type": "Microsoft.Authorization/policyAssignments", - "apiVersion": "2021-06-01", + "apiVersion": "2025-01-01", "name": "TestPolicyAssignmentDeletion", "properties": { "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/0a914e76-4921-4c19-b460-a2d36003525a" @@ -692,7 +722,7 @@ }, { "type": "Microsoft.Resources/deployments", - "apiVersion": "2019-10-01", + "apiVersion": "2024-11-01", "name": "RuleGroupCollection", "resourceGroup": "App1-azopsrg", "dependsOn": [ @@ -756,7 +786,7 @@ }, { "type": "Microsoft.Resources/deployments", - "apiVersion": "2019-10-01", + "apiVersion": "2024-11-01", "name": "LockTest", "resourceGroup": "Lock1-azopsrg", "dependsOn": [ @@ -788,7 +818,7 @@ }, { "type": "Microsoft.Resources/deployments", - "apiVersion": "2019-10-01", + "apiVersion": "2024-11-01", "name": "LockTest2", "resourceGroup": "Lock2-azopsrg", "dependsOn": [ @@ -814,7 +844,7 @@ }, { "type": "Microsoft.Authorization/policyAssignments", - "apiVersion": "2021-06-01", + "apiVersion": "2025-01-01", "name": "TestPolicyAssignment2", "properties": { "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/0a914e76-4921-4c19-b460-a2d36003525a" @@ -833,7 +863,7 @@ // Resource Group, Role Assignment, Policy Exemption and Route Table - Test - Platform - Management - otherSubscription-x - App1-azopsrg { "type": "Microsoft.Resources/deployments", - "apiVersion": "2020-10-01", + "apiVersion": "2024-11-01", "name": "AzOps-Tests-otherNested", "subscriptionId": "[parameters('otherSubscriptionId')]", "location": "northeurope", @@ -846,13 +876,13 @@ "resources": [ { "type": "Microsoft.Resources/resourceGroups", - "apiVersion": "2019-10-01", + "apiVersion": "2024-11-01", "name": "App1-azopsrg", "location": "northeurope" }, { "type": "Microsoft.Resources/deployments", - "apiVersion": "2019-10-01", + "apiVersion": "2024-11-01", "name": "RouteTableAndPolicy", "resourceGroup": "App1-azopsrg", "dependsOn": [ @@ -896,7 +926,7 @@ }, { "type": "Microsoft.Resources/deployments", - "apiVersion": "2019-10-01", + "apiVersion": "2024-11-01", "name": "RuleGroupCollection", "resourceGroup": "App1-azopsrg", "dependsOn": [ diff --git a/src/tests/templates/biceperror.bicep b/src/tests/templates/biceperror.bicep index d65834df..99b2ff50 100644 --- a/src/tests/templates/biceperror.bicep +++ b/src/tests/templates/biceperror.bicep @@ -1,7 +1,7 @@ param staName string = 'eroazops${uniqueString(resourceGroup().id)}' param location string = resourceGroup().location -resource storage_resource 'Microsoft.Storage/storageAccounts@2021-08-01' = { +resource storage_resource 'Microsoft.Storage/storageAccounts@2024-01-01' = { name: staName location: location kind: 'StorageV2' diff --git a/src/tests/templates/bicepparamtest.bicep b/src/tests/templates/bicepparamtest.bicep index d3fce444..74e2b958 100644 --- a/src/tests/templates/bicepparamtest.bicep +++ b/src/tests/templates/bicepparamtest.bicep @@ -1,7 +1,7 @@ param name string param location string -resource symbolicname 'Microsoft.Network/routeTables@2023-04-01' = { +resource symbolicname 'Microsoft.Network/routeTables@2024-05-01' = { name: name location: location properties: { diff --git a/src/tests/templates/biceptest.bicep b/src/tests/templates/biceptest.bicep index a16f3fce..f22e7be3 100644 --- a/src/tests/templates/biceptest.bicep +++ b/src/tests/templates/biceptest.bicep @@ -3,7 +3,7 @@ targetScope = 'subscription' param resourceGroupName string param location string -resource myRg 'Microsoft.Resources/resourceGroups@2021-04-01' = { +resource myRg 'Microsoft.Resources/resourceGroups@2024-11-01' = { name: resourceGroupName location: location tags: {} diff --git a/src/tests/templates/decoy.westeurope.bicep b/src/tests/templates/decoy.westeurope.bicep index f790cbf7..feec0de5 100644 --- a/src/tests/templates/decoy.westeurope.bicep +++ b/src/tests/templates/decoy.westeurope.bicep @@ -1,7 +1,7 @@ param name string param location string = resourceGroup().location -resource symbolicname 'Microsoft.Network/routeTables@2023-04-01' = { +resource symbolicname 'Microsoft.Network/routeTables@2024-05-01' = { name: name location: location properties: { diff --git a/src/tests/templates/deployallrt.westeurope.bicep b/src/tests/templates/deployallrt.westeurope.bicep index f790cbf7..feec0de5 100644 --- a/src/tests/templates/deployallrt.westeurope.bicep +++ b/src/tests/templates/deployallrt.westeurope.bicep @@ -1,7 +1,7 @@ param name string param location string = resourceGroup().location -resource symbolicname 'Microsoft.Network/routeTables@2023-04-01' = { +resource symbolicname 'Microsoft.Network/routeTables@2024-05-01' = { name: name location: location properties: { diff --git a/src/tests/templates/deployallrt2.westeurope.bicep b/src/tests/templates/deployallrt2.westeurope.bicep index 83b6269c..fb74f4ab 100644 --- a/src/tests/templates/deployallrt2.westeurope.bicep +++ b/src/tests/templates/deployallrt2.westeurope.bicep @@ -1,7 +1,7 @@ param name string = 'deployallrt2wex123' param location string = resourceGroup().location -resource symbolicname 'Microsoft.Network/routeTables@2023-04-01' = { +resource symbolicname 'Microsoft.Network/routeTables@2024-05-01' = { name: name location: location properties: { diff --git a/src/tests/templates/deployallrtbase.bicep b/src/tests/templates/deployallrtbase.bicep index f790cbf7..feec0de5 100644 --- a/src/tests/templates/deployallrtbase.bicep +++ b/src/tests/templates/deployallrtbase.bicep @@ -1,7 +1,7 @@ param name string param location string = resourceGroup().location -resource symbolicname 'Microsoft.Network/routeTables@2023-04-01' = { +resource symbolicname 'Microsoft.Network/routeTables@2024-05-01' = { name: name location: location properties: { diff --git a/src/tests/templates/policywithuam.bicep b/src/tests/templates/policywithuam.bicep index 59f8791a..c9372669 100644 --- a/src/tests/templates/policywithuam.bicep +++ b/src/tests/templates/policywithuam.bicep @@ -5,12 +5,12 @@ param uamName string targetScope = 'resourceGroup' -resource uam 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = { +resource uam 'Microsoft.ManagedIdentity/userAssignedIdentities@2024-11-30' = { name: uamName location: location } -resource assignment 'Microsoft.Authorization/policyAssignments@2022-06-01' = { +resource assignment 'Microsoft.Authorization/policyAssignments@2025-01-01' = { name: policyAssignmentName location: location identity: { diff --git a/src/tests/templates/pushmgmttest1displayname (pushmgmttest1id)/microsoft.management_managementgroups-pushmgmttest1id.json b/src/tests/templates/pushmgmttest1displayname (pushmgmttest1id)/microsoft.management_managementgroups-pushmgmttest1id.json index 0830e76a..dcbfbb93 100644 --- a/src/tests/templates/pushmgmttest1displayname (pushmgmttest1id)/microsoft.management_managementgroups-pushmgmttest1id.json +++ b/src/tests/templates/pushmgmttest1displayname (pushmgmttest1id)/microsoft.management_managementgroups-pushmgmttest1id.json @@ -12,7 +12,7 @@ { "type": "Microsoft.Management/managementGroups", "name": "pushmgmttest1id", - "apiVersion": "2021-04-01", + "apiVersion": "2023-04-01", "scope": "/", "properties": { "displayName": "pushmgmttest1displayname", @@ -25,7 +25,7 @@ }, { "type": "Microsoft.Resources/deployments", - "apiVersion": "2020-10-01", + "apiVersion": "2024-11-01", "name": "AzOps-microsoft.management_managementgroups-nested", "location": "[deployment().location]", "properties": { diff --git a/src/tests/templates/pushmgmttest2displayname (pushmgmttest2id)/microsoft.management_managementgroups-pushmgmttest2id.json b/src/tests/templates/pushmgmttest2displayname (pushmgmttest2id)/microsoft.management_managementgroups-pushmgmttest2id.json index fdfa16cc..80332f24 100644 --- a/src/tests/templates/pushmgmttest2displayname (pushmgmttest2id)/microsoft.management_managementgroups-pushmgmttest2id.json +++ b/src/tests/templates/pushmgmttest2displayname (pushmgmttest2id)/microsoft.management_managementgroups-pushmgmttest2id.json @@ -12,7 +12,7 @@ { "type": "Microsoft.Management/managementGroups", "name": "pushmgmttest2id", - "apiVersion": "2021-04-01", + "apiVersion": "2023-04-01", "scope": "/", "properties": { "displayName": "pushmgmttest2displayname", @@ -25,7 +25,7 @@ }, { "type": "Microsoft.Resources/deployments", - "apiVersion": "2020-10-01", + "apiVersion": "2024-11-01", "name": "AzOps-microsoft.management_managementgroups-nested", "location": "[deployment().location]", "properties": { diff --git a/src/tests/templates/rbactest.bicep b/src/tests/templates/rbactest.bicep index d0f4de3e..42914c26 100644 --- a/src/tests/templates/rbactest.bicep +++ b/src/tests/templates/rbactest.bicep @@ -4,7 +4,7 @@ param location string param roleDefinitionId string targetScope = 'subscription' -resource assignment 'Microsoft.Authorization/policyAssignments@2022-06-01' = { +resource assignment 'Microsoft.Authorization/policyAssignments@2025-01-01' = { name: policyAssignmentName location: location identity: { diff --git a/src/tests/templates/rgdualdeploy.bicep b/src/tests/templates/rgdualdeploy.bicep index 9a275846..9929bc7c 100644 --- a/src/tests/templates/rgdualdeploy.bicep +++ b/src/tests/templates/rgdualdeploy.bicep @@ -3,7 +3,7 @@ targetScope = 'subscription' param resourceGroupName string param location string -resource myRg 'Microsoft.Resources/resourceGroups@2021-04-01' = { +resource myRg 'Microsoft.Resources/resourceGroups@2024-11-01' = { name: resourceGroupName location: location tags: {} diff --git a/src/tests/templates/rgsubonlydeploy.bicep b/src/tests/templates/rgsubonlydeploy.bicep index 9a275846..9929bc7c 100644 --- a/src/tests/templates/rgsubonlydeploy.bicep +++ b/src/tests/templates/rgsubonlydeploy.bicep @@ -3,7 +3,7 @@ targetScope = 'subscription' param resourceGroupName string param location string -resource myRg 'Microsoft.Resources/resourceGroups@2021-04-01' = { +resource myRg 'Microsoft.Resources/resourceGroups@2024-11-01' = { name: resourceGroupName location: location tags: {} diff --git a/src/tests/templates/rtcustomdelete.bicep b/src/tests/templates/rtcustomdelete.bicep index a95a768b..471f3e92 100644 --- a/src/tests/templates/rtcustomdelete.bicep +++ b/src/tests/templates/rtcustomdelete.bicep @@ -4,7 +4,7 @@ param location string = resourceGroup().location var storageName = '${toLower(staName)}${uniqueString(resourceGroup().id)}' -resource rt 'Microsoft.Network/routeTables@2023-04-01' = { +resource rt 'Microsoft.Network/routeTables@2024-05-01' = { name: name location: location properties: { @@ -14,7 +14,7 @@ resource rt 'Microsoft.Network/routeTables@2023-04-01' = { } } -resource storage_resource 'Microsoft.Storage/storageAccounts@2021-08-01' = { +resource storage_resource 'Microsoft.Storage/storageAccounts@2024-01-01' = { name: storageName location: location kind: 'StorageV2' diff --git a/src/tests/templates/rtmultibase.bicep b/src/tests/templates/rtmultibase.bicep index f790cbf7..feec0de5 100644 --- a/src/tests/templates/rtmultibase.bicep +++ b/src/tests/templates/rtmultibase.bicep @@ -1,7 +1,7 @@ param name string param location string = resourceGroup().location -resource symbolicname 'Microsoft.Network/routeTables@2023-04-01' = { +resource symbolicname 'Microsoft.Network/routeTables@2024-05-01' = { name: name location: location properties: { diff --git a/src/tests/templates/rtsuffix0102.bicep b/src/tests/templates/rtsuffix0102.bicep index f790cbf7..feec0de5 100644 --- a/src/tests/templates/rtsuffix0102.bicep +++ b/src/tests/templates/rtsuffix0102.bicep @@ -1,7 +1,7 @@ param name string param location string = resourceGroup().location -resource symbolicname 'Microsoft.Network/routeTables@2023-04-01' = { +resource symbolicname 'Microsoft.Network/routeTables@2024-05-01' = { name: name location: location properties: { diff --git a/src/tests/templates/staparalleldeploy.bicep b/src/tests/templates/staparalleldeploy.bicep index ebe95f2c..2fe68297 100644 --- a/src/tests/templates/staparalleldeploy.bicep +++ b/src/tests/templates/staparalleldeploy.bicep @@ -3,7 +3,7 @@ param location string = resourceGroup().location var storageName = '${toLower(staName)}${uniqueString(resourceGroup().id)}' -resource storage_resource 'Microsoft.Storage/storageAccounts@2021-08-01' = { +resource storage_resource 'Microsoft.Storage/storageAccounts@2024-01-01' = { name: storageName location: location kind: 'StorageV2' diff --git a/src/tests/templates/staserialdeploy2.bicep b/src/tests/templates/staserialdeploy2.bicep index ebe95f2c..2fe68297 100644 --- a/src/tests/templates/staserialdeploy2.bicep +++ b/src/tests/templates/staserialdeploy2.bicep @@ -3,7 +3,7 @@ param location string = resourceGroup().location var storageName = '${toLower(staName)}${uniqueString(resourceGroup().id)}' -resource storage_resource 'Microsoft.Storage/storageAccounts@2021-08-01' = { +resource storage_resource 'Microsoft.Storage/storageAccounts@2024-01-01' = { name: storageName location: location kind: 'StorageV2' diff --git a/src/tests/templates/stasubonlydeploy.bicep b/src/tests/templates/stasubonlydeploy.bicep index 64744af7..b66d0cf7 100644 --- a/src/tests/templates/stasubonlydeploy.bicep +++ b/src/tests/templates/stasubonlydeploy.bicep @@ -1,7 +1,7 @@ param staName string = 'staazops${uniqueString(resourceGroup().id)}' param location string = resourceGroup().location -resource storage_resource 'Microsoft.Storage/storageAccounts@2021-08-01' = { +resource storage_resource 'Microsoft.Storage/storageAccounts@2024-01-01' = { name: staName location: location kind: 'StorageV2'