Skip to content

Commit 44e474c

Browse files
authored
fix: Add skip autodelete tag when creating resource gruop (#188)
1 parent 06e960f commit 44e474c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.infra/deployment/main.bicep

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@ targetScope = 'subscription'
22
param workspaceName string = 'azureai_samples_hub'
33
param projectName string = 'azureai_samples_proj'
44
param resourceGroupName string = 'rg-azureai-samples-validation-${utcNow('yyyyMM')}'
5+
6+
@description('The first day of the next month at deployment time in yyyy-MM-DD format.')
7+
param __firstOfNextMonth string = '${dateTimeAdd('${utcNow('yyyy-MM')}-01 00:00:00Z', 'P31D', 'yyyy-MM')}-01'
8+
9+
param resourceGroupTags object = {
10+
SkipAutoDeleteTill: __firstOfNextMonth
11+
}
12+
513
param location string = 'eastus2'
614
@description('The ID of the principal (user, service principal, etc...) to create role assignments for.')
715
param principalId string = ''
@@ -16,6 +24,7 @@ resource rg 'Microsoft.Resources/resourceGroups@2023-07-01' = {
1624
#disable-next-line use-stable-resource-identifiers
1725
name: resourceGroupName
1826
location: location
27+
tags: resourceGroupTags
1928
}
2029

2130
module acs 'modules/acs.bicep' = { name: 'acs', params: { name: acsName, location: location }, scope: rg }

0 commit comments

Comments
 (0)