Skip to content

Instantly share code, notes, and snippets.

@dploeger
dploeger / azure.tf.handlebars
Last active September 29, 2021 10:14
AWS to Azure Terraform script
resource "azurerm_dns_zone" "{{ resourceName zone }}" {
name = "{{ zone }}"
resource_group_name = {{ resourceGroupVar }}
}
{{#each records}}
{{#with this}}
{{#if (isRecordType "A" type)}}
resource "azurerm_dns_a_record" "{{ resourceName name }}_{{ resourceName ../zone }}" {
name = "{{ name }}"
@dploeger
dploeger / Elgg.php
Last active July 18, 2022 07:30
FileGator Elgg Auth Adapter
<?php
/*
* Elgg Auth Adaptor for FileGator (https://filegator.io)
* (c) 2022 Waldbühne Heessen
*/
namespace Filegator\Services\Auth\Adapters;
use Filegator\Services\Auth\AuthInterface;
use Filegator\Services\Auth\User;
@dploeger
dploeger / loki-expressions.md
Last active June 20, 2024 05:15
Loki format expressions for common log formats
@dploeger
dploeger / getawspolicydocuments.fish
Last active December 5, 2023 09:44
Get all customer managed AWS policy documents (in Fish)
for POLICYARN in (aws iam list-policies --scope Local | jq -r .Policies[].Arn)
for POLICYVERSION in (aws iam list-policy-versions --policy-arn $POLICYARN | jq -r .Versions[].VersionId)
echo $POLICYARN/$POLICYVERSION
aws iam get-policy-version --policy-arn $POLICYARN --version-id $POLICYVERSION
end
end