Skip to content

Instantly share code, notes, and snippets.

@carnei-ro
carnei-ro / steampipe
Last active August 20, 2024 14:47
Steampipe & Correlate Azure App Services with Azure App Services Plans
asdf plugin-add steampipe
asdf install steampipe latest
asdf global steampipe latest
steampipe plugin install azure
steampipe plugin install config
az functionapp list | tee /tmp/functionapps.json
az webapp list | tee /tmp/webapps.json
steampipe query
@carnei-ro
carnei-ro / lifecycle_block.sh
Last active July 8, 2024 15:18
dynamically changes lifecycle ignore_changes
#!/bin/bash
# DISCLAIMER: There is a lot of room for improvement in this script. It is a quick and dirty solution.
# Description: This script adds a lifecycle block to a resource or data source in a Terraform file focused on ignore_changes.
# This can be useful in conjunction with terragrunt and its hooks:
#
# terragrunt.hcl content:
#
# terraform {
package main
import (
"fmt"
"log"
"os"
httptransport "github.com/go-openapi/runtime/client"
resource_manager "github.com/hashicorp/hcp-sdk-go/clients/cloud-resource-manager/stable/2019-12-10/client"
@carnei-ro
carnei-ro / Tasmota_CMDs.txt
Created June 21, 2023 13:39
Sonoff re5v1c Tasmota Door Sensor
TelePeriod 30
SwitchTopic "My_Door_Sensor"
SetOption114 ON
SwitchMode2 1
Rule1
On system#boot DO publish2 homeassistant/binary_sensor/%topic%/config {"unique_id":"%topic%","expire_after":"1800","device_class":"door","name":"My Door Sensor","state_topic":"tele/%topic%/SENSOR","value_template":"{{value_json.Switch2}}"} ENDON
#!/bin/bash
export KONG_VERSION="2.8.3"
git clone https://github.com/Kong/kong.git
cd kong
git checkout tags/$KONG_VERSION
cd ..
export KONG_BUILD_TOOLS_VERSION="4.42.1"
git clone https://github.com/Kong/kong-build-tools.git