This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # make sure you az acr login to hmctsprod first, or hmctsbox if needed | |
| ACR_NAME="hmctsprod" # ACR name, not FQDN | |
| kubectl get pods --all-namespaces \ | |
| -o jsonpath='{range .items[*]}{range .spec.initContainers[*]}{.image}{"\n"}{end}{range .spec.containers[*]}{.image}{"\n"}{end}{end}' \ | |
| | sort -u \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - name: Set Azure credentials as environment variables | |
| run: | | |
| echo "Setting ARM_* env vars for Terraform..." | |
| echo "ARM_CLIENT_ID=$(jq -r .clientId <<< '${{ secrets.AZURE_CREDENTIALS }}')" >> $GITHUB_ENV | |
| echo "ARM_CLIENT_SECRET=$(jq -r .clientSecret <<< '${{ secrets.AZURE_CREDENTIALS }}')" >> $GITHUB_ENV | |
| echo "ARM_SUBSCRIPTION_ID=$(jq -r .subscriptionId <<< '${{ secrets.AZURE_CREDENTIALS }}')" >> $GITHUB_ENV | |
| echo "ARM_TENANT_ID=$(jq -r .tenantId <<< '${{ secrets.AZURE_CREDENTIALS }}')" >> $GITHUB_ENV |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| resource "azurerm_monitor_diagnostic_setting" "my_mds" { | |
| name = "my-mds" | |
| target_resource_id = azurerm_virtual_network.my_vnet.id | |
| log_analytics_workspace_id = azurerm_log_analytics_workspace.my_ws.id | |
| dynamic "enabled_log" { | |
| for_each = var.my_condition ? [1] : [] | |
| content { | |
| category = "AuditEvent" | |
| retention_policy { |