File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,9 @@ jobs:
105105        id : deploy 
106106        run : | 
107107          set -e 
108+            # Generate current timestamp in desired format: YYYY-MM-DDTHH:MM:SS.SSSSSSSZ 
109+             current_date=$(date -u +"%Y-%m-%dT%H:%M:%S.%7NZ") 
110+            
108111          az deployment group create \ 
109112            --resource-group ${{ env.RESOURCE_GROUP_NAME }} \ 
110113            --template-file infra/main.bicep \ 
@@ -118,6 +121,7 @@ jobs:
118121              enablePrivateNetworking=true \ 
119122              enableScalability=true \ 
120123              createdBy="Pipeline" \ 
124+               tags="{'SecurityControl':'Ignore','Purpose':'Deploying and Cleaning Up Resources for Validation','CreatedDate':'$current_date'}" 
121125               
122126
123127name : Send Notification on Failure 
Original file line number Diff line number Diff line change @@ -125,6 +125,9 @@ jobs:
125125            IMAGE_TAG="latest" 
126126          fi 
127127
128+           # Generate current timestamp in desired format: YYYY-MM-DDTHH:MM:SS.SSSSSSSZ 
129+             current_date=$(date -u +"%Y-%m-%dT%H:%M:%S.%7NZ") 
130+ 
128131          az deployment group create \ 
129132            --resource-group ${{ env.RESOURCE_GROUP_NAME }} \ 
130133            --template-file infra/main.bicep \ 
@@ -139,6 +142,7 @@ jobs:
139142              azureAiServiceLocation='${{ env.AZURE_LOCATION }}' \ 
140143              gptModelCapacity=150 \ 
141144              createdBy="Pipeline" \ 
145+               tags="{'SecurityControl':'Ignore','Purpose':'Deploying and Cleaning Up Resources for Validation','CreatedDate':'$current_date'}" \ 
142146            --output json 
143147
144148name : Extract Web App and API App URLs 
Original file line number Diff line number Diff line change @@ -170,15 +170,17 @@ var allTags = union(
170170  },
171171  tags 
172172)
173- @description ('Optional created by user name' )
174- param  createdBy  string  = empty (deployer ().userPrincipalName ) ? ''  : split (deployer ().userPrincipalName , '@' )[0 ] 
173+ @description ('Tag, Created by user name' )
174+ param  createdBy  string  = contains (deployer (), 'userPrincipalName' )? split (deployer ().userPrincipalName , '@' )[0 ]: deployer ().objectId 
175+  
175176
176177resource  resourceGroupTags  'Microsoft.Resources/tags@2021-04-01'  = {
177178  name : 'default' 
178179  properties : {
179180    tags : {
180181      ...allTags 
181182      TemplateName : 'MACAE' 
183+       Type : enablePrivateNetworking  ? 'WAF'  : 'Non-WAF' 
182184      CreatedBy : createdBy 
183185    }
184186  }
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments