Skip to content

Instantly share code, notes, and snippets.

View phillhocking's full-sized avatar

Phillip Andrew Hocking phillhocking

View GitHub Profile
@darkarnium
darkarnium / libvirt-linux-patches.xsl
Created November 9, 2021 18:36
Terraform Libvirt Patches
<?xml version="1.0" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes" indent="yes"/>
<xsl:output method="xml" indent="yes" />
<xsl:param name="targetBusSata" select="'sata'"/>
<xsl:param name="targetBusVirtio" select="'virtio'"/>
<xsl:param name="vcpuPlacementAuto" select="'auto'"/>
<xsl:param name="diskCache" select="'none'"/>
<xsl:param name="diskIoQueues" select="'4'"/>
@ITBlogger
ITBlogger / main.tf
Created February 8, 2021 20:09
Terraform Cloud Workflow Creation Using Terraform
terraform {
required_providers {
tfe = {
source = "hashicorp/tfe"
}
}
}
provider "tfe" {
alias = "default"
@greyhoundforty
greyhoundforty / tf-salt.md
Last active March 22, 2023 13:12
Example of using Salt with Terraform

In this example I am spinning up 2 web servers and 2 file servers using Terraform. During the provision process, Terraform will run a remote-exec script to bind the 4 new servers to the salt master server.

Export Variables

Substitute actual user and API key for SL_USERNAME and SL_API_KEY

export TF_VAR_slusername="SL_USERNAME"
export TF_VAR_slapikey="SL_API_KEY"
@arsdehnel
arsdehnel / iam-terraform-create-policy.tf
Last active September 21, 2023 18:12
AWS IAM policies for running Terraform from an EC2 instance.
resource "aws_iam_policy" "terraform_create_policy" {
name = "terraform_create_policy"
path = "/"
policy = "${data.aws_iam_policy_document.terraform_create_policy.json}"
}
data "aws_iam_policy_document" "terraform_create_policy" {
statement {
sid = "1"
actions = [
@stevejenkins
stevejenkins / unifi_ssl_import.sh
Last active August 30, 2021 03:57
Import and use SSL certificates (including Let's Encrypt) with the Ubiquiti UniFi Controller on Unix/Linux Systems
# MOVED TO https://github.com/stevejenkins/unifi-linux-utils