Skip to content

Commit a683c5a

Browse files
added tags in CAdeploy.yml file
1 parent a1e057a commit a683c5a

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/CAdeploy.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,17 @@ jobs:
105105
rg_exists=$(az group exists --name ${{ env.RESOURCE_GROUP_NAME }})
106106
if [ "$rg_exists" = "false" ]; then
107107
echo "Resource group does not exist. Creating..."
108-
az group create --name ${{ env.RESOURCE_GROUP_NAME }} --location ${{ env.AZURE_LOCATION }} || { echo "Error creating resource group"; exit 1; }
108+
109+
# Generate current timestamp in desired format: YYYY-MM-DDTHH:MM:SS.SSSSSSSZ
110+
current_date=$(date -u +"%Y-%m-%dT%H:%M:%S.%7NZ")
111+
az group create --name ${{ env.RESOURCE_GROUP_NAME }} \
112+
--location ${{ env.AZURE_LOCATION }} \
113+
--tags "CreatedBy=Deployment Lifecycle Automation Pipeline" \
114+
"Purpose=Deploying and Cleaning Up Resources for Validation" \
115+
"CreatedDate=$current_date" \
116+
"ApplicationName=BYOC-Client Advisor Accelerator" \
117+
"SecurityControl=Ignore" \
118+
|| { echo "Error creating resource group"; exit 1; }
109119
else
110120
echo "Resource group already exists."
111121
fi

0 commit comments

Comments
 (0)