Skip to content

Deploy AVD to NIH Environment #146

Deploy AVD to NIH Environment

Deploy AVD to NIH Environment #146

Workflow file for this run

name: Deploy AVD to NIH Environment
on:
workflow_dispatch:
inputs:
environment:
type: choice
description: Choose environment to deploy
options:
- Test
- Prod
jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment: ${{ github.event.inputs.environment }}
steps:
- name: Checkout code
uses: actions/checkout@main
- name: Log into Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
enable-AzPSSession: true
- name: Deploy Bicep file to ${{ github.event.inputs.environment }} environment
uses: azure/arm-deploy@v2
with:
scope: subscription
subscriptionId: ${{ secrets.AZURE_SUB_ID }}
region: eastus2
#deploymentMode: 'Validate'
template: ./workload/bicep/deploy-baseline-arpah.bicep
parameters: ./workload/bicep/parameters/deploy-baseline-parameters-arpah.json deploymentEnvironment=${{ github.event.inputs.environment }} avdWorkloadSubsId=${{ secrets.AZURE_SUB_ID }} imageGallerySubscriptionId=${{ secrets.IMAGE_GALLERY_SUB_ID }} avdVmLocalUserName=${{ secrets.AVD_ADMIN }} avdVmLocalUserPassword=${{ secrets.AVD_ADMINPASS }} avdEnterpriseAppObjectId=${{ secrets.AZURE_AVD_OBJECTID }} existingVnetAvdSubnetResourceId=${{ secrets.AVD_SUBNET_ID }} existingVnetPrivateEndpointSubnetResourceId=${{ secrets.AVD_SUBNET_ID }} identityDomainName=${{ secrets.AD_NAME}} avdDomainJoinUserName=${{ secrets.AD_JOIN_USER }} avdDomainJoinUserPassword=${{ secrets.AD_JOIN_PASS }} avdOuPath="${{ secrets.AD_OU }}" storageOuPath="${{ secrets.AD_OU }}" storageFilePrivateEndpointStaticIp="${{ secrets.STORAGEFILEPRIVATEENDPOINTSTATICIP }}" storageFilePrivateEndpointStaticIpRemote="${{ secrets.STORAGEFILEPRIVATEENDPOINTSTATICIPREMOTE }}"
failOnStdErr: true
# - name: Update networking in ${{ github.event.inputs.environment }} environment
# uses: azure/arm-deploy@v2
# with:
# scope: subscription
# subscriptionId: ${{ secrets.AZURE_SUB_ID }}
# region: eastus2
# #deploymentMode: 'Validate'
# template: ./workload/bicep/update-networking-arpah.bicep
# parameters: ./workload/bicep/parameters/update-networking-parameters-arpah.json deploymentEnvironment=${{ github.event.inputs.environment }} avdWorkloadSubsId=${{ secrets.AZURE_SUB_ID }} existingVnetAvdSubnetResourceId=${{ secrets.AVD_SUBNET_ID }}"
# failOnStdErr: true
- name: Update AVD Application Group Display Name in the ${{ github.event.inputs.environment }} environment
uses: azure/powershell@v2
env:
ResourceGroupName: 'avd-nih-arpah-${{ github.event.inputs.environment }}-use2-service-objects'
ApplicationGroupName: 'vdag-desktop-app1-${{ github.event.inputs.environment }}-use2-001'
Name: 'SessionDesktop'
FriendlyName: 'ARPA-H Windows Desktop'
with:
inlineScript: ./.github/workflows/scripts/update_app_display_name.ps1 -ResourceGroupName ${{ env.ResourceGroupName }} -ApplicationGroupName ${{ env.ApplicationGroupName }} -Name ${{ env.Name }} -FriendlyName '${{ env.FriendlyName }}'
azPSVersion: "latest"
errorActionPreference: continue