Sample terraform with a resource that we'd like to catch
# main.tf
resource "null_resource" "default" {
provisioner "local-exec" {
command = "sh -c 'echo hi'"
}Here are the steps
role_arn in the aws provider block.The current script simply uses kandji to run local homebrew to upgrade xz if it's vulnerable.
This is very useful if kandji was not used to provision homebrew and was installed by the user.
The way it works is
| #!/bin/bash | |
| # Thanks to Andrew Zhang in hangops on 2024-10-18 | |
| # Get the battery percentage | |
| battery_info=$(pmset -g batt) | |
| battery_discharging=$(echo "$battery_info" | grep discharging -c) | |
| battery_percentage=$(echo "$battery_info" | grep -o "[0-9]*%" | tr -d '%') | |
| # Check if the battery percentage is less than threshold |
| [ | |
| { | |
| "Name": "snip", | |
| "CreationDate": "2019-12-12T02:45:01+00:00", | |
| "Location": { | |
| "LocationConstraint": null | |
| }, | |
| "Tags": [], | |
| "Policy": "snip", | |
| "Acl": { |