Skip to content

Instantly share code, notes, and snippets.

View cmendible's full-sized avatar
🖖
Cloud for all

Carlos Mendible cmendible

🖖
Cloud for all
View GitHub Profile
@cmendible
cmendible / SetupPodIdentityKeyVaultIntegration.ps1
Created November 30, 2019 09:26
AKS: Setup Pod Identity Key Vault Integration
param(
[string]
[Parameter(Mandatory = $true)]
$resourceGroupName,
[string]
[Parameter(Mandatory = $true)]
$identityName,
[string]
[Parameter(Mandatory = $true)]
$identitySelector,
@cmendible
cmendible / debug.log
Last active December 10, 2019 18:41
terraform destroy fails for azurerm_role_definition if role scope is a Management Group
This file has been truncated, but you can view the full file.
2019/12/10 19:22:08 [INFO] Terraform version: 0.12.17
2019/12/10 19:22:08 [INFO] Go runtime version: go1.12.13
2019/12/10 19:22:08 [INFO] CLI args: []string{"C:\\ProgramData\\chocolatey\\lib\\terraform\\tools\\terraform.exe", "destroy"}
2019/12/10 19:22:08 [DEBUG] Attempting to open CLI config file: C:\Users\terraformuser\AppData\Roaming\terraform.rc
2019/12/10 19:22:08 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2019/12/10 19:22:08 [INFO] CLI command args: []string{"destroy"}
2019/12/10 19:22:08 [TRACE] Meta.Backend: no config given or present on disk, so returning nil config
2019/12/10 19:22:08 [TRACE] Meta.Backend: backend has not previously been initialized in this working directory
2019/12/10 19:22:08 [DEBUG] New state was assigned lineage "eb32be79-5d30-b86d-2b34-21097b634648"
2019/12/10 19:22:08 [TRACE] Meta.Backend: using default local state only (no backend configuration, and no existing initialized backend)
@cmendible
cmendible / on_demand_azure_policy_scan.ps1
Created April 8, 2020 11:32
On-demand Azure Policy Scan with Azure CLI and Powershell
# Based on @maikvandergaag work: https://msftplayground.com/2019/06/on-demand-azure-policy-scan/
$account = (az account show -o json | ConvertFrom-Json)
$subscriptionId = $account.id
$tenantId = $account.homeTenantId
$token = (az account get-access-token --tenant $tenantId -o json | ConvertFrom-Json).accessToken
$authHeader = @{
'Content-Type'='application/json'
'Authorization'='Bearer ' + $token
}
@cmendible
cmendible / AzureFunctionsScaleMonitors.md
Created February 17, 2023 12:16
Azure Function Extensions and Scale Monitors

Azure WebJobs SDK Extensions

Extensions

.NET Isolated: Microsoft.Azure.Functions.Worker.Extensions

.NET Worker

Scale Monitors

@cmendible
cmendible / failing-readinessprobe.yaml
Created April 28, 2023 07:24
Kubernetes Failing Readiness Probe
apiVersion: v1
kind: Pod
metadata:
name: failing-readinessprobe-pod
spec:
containers:
- name: busybox
image: busybox
command:
- sh