Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add retry for az login in e2e action, add tags for azurerm_resource_group_template_deployment #99

Merged
merged 3 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,18 @@ jobs:
shell: bash
run: |
set -e
az login --identity --username $MSI_ID > /dev/null
MAX_RETRIES=10
RETRY_COUNT=0
until [ $RETRY_COUNT -ge $MAX_RETRIES ]
do
az login --identity --username $MSI_ID > /dev/null && break
RETRY_COUNT=$[$RETRY_COUNT+1]
sleep 10
done
if [ $RETRY_COUNT -eq $MAX_RETRIES ]; then
echo "Failed to login after $MAX_RETRIES attempts."
exit 1
fi
export ARM_SUBSCRIPTION_ID=$(az login --identity --username $MSI_ID | jq -r '.[0] | .id')
export ARM_TENANT_ID=$(az login --identity --username $MSI_ID | jq -r '.[0] | .tenantId')
export ARM_CLIENT_ID=$(az identity list | jq -r --arg MSI_ID "$MSI_ID" '.[] | select(.principalId == $MSI_ID) | .clientId')
Expand Down
1 change: 1 addition & 0 deletions main.telemetry.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ resource "azurerm_resource_group_template_deployment" "telemetry" {
deployment_mode = "Incremental"
name = local.telem_arm_deployment_name
resource_group_name = var.resource_group_name
tags = null
template_content = local.telem_arm_template_content
}