Skip to content

Instantly share code, notes, and snippets.

@noelbundick
noelbundick / azuredeploy.json
Created April 15, 2019 23:01
Do as I say, not as I do
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"baseName": {
"type": "string",
"defaultValue": "noelbundick"
},
"customHostname": {
"type": "string",
@noelbundick
noelbundick / azuredeploy.json
Created February 4, 2019 16:52
Subscription role assignment
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"utilityIdentityId": {
"type": "string"
}
},
"variables": {
"contributorRoleDefinitionId": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
@noelbundick
noelbundick / LICENSE
Created January 13, 2019 05:13
Gists as a content management system
MIT License
Copyright (c) 2019 Noel Bundick
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@noelbundick
noelbundick / LICENSE
Last active January 12, 2019 22:07
Azure Function w/ User Assigned Identity
MIT License
Copyright (c) 2018 Noel Bundick
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@noelbundick
noelbundick / LICENSE
Created December 15, 2018 23:18
Secure code execution via ARM template and Azure Container Instances
MIT License
Copyright (c) 2018 Noel Bundick
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@noelbundick
noelbundick / Dockerfile
Created December 10, 2018 22:59
azure-redis-cli
FROM redis:5-alpine
RUN apk add stunnel
COPY start.sh /start.sh
ENTRYPOINT ["/start.sh"]
@noelbundick
noelbundick / LICENSE.md
Created December 10, 2018 21:28
Resize Azure Cloud Shell storage

MIT License

Copyright (c) 2018 Noel Bundick

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

@noelbundick
noelbundick / LICENSE
Last active February 4, 2024 15:35
Azure Container Instances as SOCKS proxy
MIT License
Copyright (c) 2018 Noel Bundick
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@noelbundick
noelbundick / k8s-azure.json
Created August 16, 2018 21:53
k8s Azure Cloud Provider permissions
{
"Name": "Azure k8s Cloud Provider",
"IsCustom": true,
"Description": "Everything needed by the k8s 1.11 Azure cloud provider (not including ACR, addons, etc)",
"Actions": [
"Microsoft.Compute/disks/delete",
"Microsoft.Compute/disks/read",
"Microsoft.Compute/disks/write",
"Microsoft.Compute/virtualMachineScaleSets/manualUpgrade/action",
"Microsoft.Compute/virtualMachineScaleSets/read",
@noelbundick
noelbundick / demo.sh
Created August 1, 2018 15:57
Grant AKS service principal permissions to another resource
SPID=`az aks show -n aks -g trash1-aks --query servicePrincipalProfile.clientId -o tsv`
SUBNET_ID=`az network vnet subnet show -n default --vnet-name windevbox-vnet -g windevbox --query id -o tsv`
az role assignment create --role 'Network Contributor' --assignee $SPID --scope $SUBNET_ID