Skip to content

Instantly share code, notes, and snippets.

View richeney's full-sized avatar

Richard Cheney richeney

View GitHub Profile
@richeney
richeney / installLatestHashicorpBinary.sh
Last active January 18, 2023 14:53
Installs either terraform or packer
#!/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
@richeney
richeney / denyWildcardJITSecurityRules.sh
Created July 28, 2020 17:25
custom policy to prevent JIT wildcard entries - not working?!
#!/bin/bash
subscriptionId=$(az account show --query id --output tsv)
read -r -d '' policyRule <<'EOF'
{
"if": {
"allOf": [
{
"field": "type",