Skip to content

Instantly share code, notes, and snippets.

View oulman's full-sized avatar

James Oulman oulman

  • HashiCorp
  • Gainesville, FL
  • X @oulman
View GitHub Profile
@oulman
oulman / config.tf
Created December 4, 2023 15:11
Cadence on ECS / NLB
resource "aws_service_discovery_service" "cadence_dc1" {
name = "cadence"
dns_config {
namespace_id = data.aws_service_discovery_dns_namespace.dc1.id
dns_records {
ttl = 10
type = "A"
}

Consul DNS configuration for clients on Ubuntu 20.04

This snippet can be used to configure Consul DNS forwarding per HashiCorp Learn | DNS Forwarding with added persistence across reboots on Ubuntu 20.04.

# install iptables-persistent to manage iptables NAT rules across reboots

echo iptables-persistent iptables-persistent/autosave_v4 boolean true | sudo debconf-set-selections
echo iptables-persistent iptables-persistent/autosave_v6 boolean true | sudo debconf-set-selections
@oulman
oulman / gist.md
Last active October 7, 2022 20:35
canonical list of azurerm terraform monitor_activity_log_alert service_health services

In PR #19878 the AzureRM monitor_activity_log_alert resource added support for granular service_health definitions. Outside of the UI, there is no obvious way of getting a list of inputs for the services parameter. The Azure portal uses an undocumented (AFAICT) API in the Microsoft.ResourceHealth provider to list supported services.

https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/monitor_activity_log_alert#services

➜  az rest --method GET --url https://management.azure.com/providers/Microsoft.ResourceHealth/metadata/supportedServices/\?api-version\=2018-07-01 | jq '.properties.supportedValues[] .displayName'
"API Management"
"Action Groups"

Keybase proof

I hereby claim:

  • I am oulman on github.
  • I am oulman (https://keybase.io/oulman) on keybase.
  • I have a public key whose fingerprint is 9ED3 F026 7842 04DE 2553 B97F B558 014A 28BC CEB7

To claim this, I am signing this object: