View import_keyvault_certificates.sh
This file contains 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 | |
################################################################ | |
# Search for certs downloaded by the Azure Key Vault Extension, | |
# convert from PEM to DER format and update the CA certificates. | |
# | |
# Designed to be run as root from crontab. | |
# Will be silent if no files are converted. | |
################################################################ | |
error() |
View azcmagent_token
This file contains 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
#/bin/bash | |
error() | |
{ | |
[[ -n "$@" ]] && echo "ERROR: $@" >&2 | |
exit 1 | |
} | |
urlencode() { | |
# urlencode <string> |
View addpolicy.sh
This file contains 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
#!/bin/bash | |
################################################################################################### | |
## Loop through stdin of ARM resource compliant policy files | |
## Example format is | |
## https://github.com/richeney/azure-blueprints/blob/master/policies/auditemptytag.json | |
## Requires az and jq | |
## Can use unpathed URIs if you have exported URIBASE | |
################################################################################################### | |
error() |
View cloudshell.vim
This file contains 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
" Vim color file | |
" Maintainer: Richard Cheney (from delek.vim) | |
" Last Change: 2018 Apr 09 | |
hi clear | |
let g:colors_name = "cloudshell" | |
" Normal should come first | |
hi Normal guifg=Black guibg=White |
View installLatestHashicorpBinary.sh
This file contains 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
#!/bin/bash | |
###################################################### | |
# Utility script to download latest Hashicorp | |
# binaries and move into /usr/local/bin. Uses their | |
# releases APIs. | |
# | |
# Requires sudo password unless sudoers is configured. | |
# | |
# Can be renamed to installLatestTerraform.sh or | |
# installLatestPacker.sh. If not then specify |
View denyWildcardJITSecurityRules.sh
This file contains 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
#!/bin/bash | |
subscriptionId=$(az account show --query id --output tsv) | |
read -r -d '' policyRule <<'EOF' | |
{ | |
"if": { | |
"allOf": [ | |
{ | |
"field": "type", |