generate a signed URL for AWS S3 Bucket Objects by calling this script the following way:
python s3-generate-signed-url.py "us-west-1" "my-bucket" "index.html"
The output will look something like this:
{ | |
"auths": { | |
"https://index.docker.io/v1/": {}, | |
"localhost:8083": {} | |
}, | |
"credsStore": "osxkeychain" | |
} |
--- | |
pipelines: | |
cloudfront: | |
- step: | |
image: python:3.5.1 | |
script: | |
- pip install awscli | |
# set up AWS access credentials incl. region | |
- export AWS_ACCESS_KEY_ID="${AWS_ACCESS_KEY_ID}" |
#!/bin/sh | |
docker volume ls -qf dangling=true | xargs -r docker volume rm |
# login to Azure CLI | |
az login | |
# complete flow by opening aka.ms/devicelogin and entering code | |
# list Azure VMs, pipe to `jq`, then get `plan` details of 0th instance | |
az vm list | jq .[0].plan |
generate a signed URL for AWS S3 Bucket Objects by calling this script the following way:
python s3-generate-signed-url.py "us-west-1" "my-bucket" "index.html"
The output will look something like this:
Creating a Personal Access Token (PAT): help.github.com
Provider documentation: terraform.io/docs/providers/github
Provider source: github.com/terraform-providers/terraform-provider-github
Sensitive Data in Terraform State: terraform.io/docs/state/sensitive-data.html
#!/usr/bin/env bash | |
VERSIONS=(0.0.37 0.0.36 0.0.35 0.0.33 0.0.32 0.0.31 0.0.30 0.0.29 0.0.28 0.0.27 0.0.26 0.0.25 0.0.24 0.0.23 0.0.22 0.0.21 0.0.20 0.0.19 0.0.18 0.0.17 0.0.16 0.0.15 0.0.14 0.0.13 0.0.12 0.0.11 0.0.10 0.0.9 0.0.8 0.0.7) | |
SHIPYARD="/Users/ksatirli/Downloads/yard-darwin" | |
for VERSION in "${VERSIONS[@]}" | |
do | |
${SHIPYARD} version install "${VERSION}" | |
done |
terraform { | |
required_providers { | |
http = "~> 1.2" | |
} | |
required_version = "~> 0.12.29" | |
} | |
data "http" "terraform_cloud_ip_ranges" { | |
url = "https://app.terraform.io/api/meta/ip-ranges" |
#!/bin/sh | |
# This script sends a requests to the Terraform Cloud API and updates the | |
# organization name from "${OLD_TFC_ORG_NAME}" to "${NEW_TFC_ORG_NAME}". | |
# | |
# This script can be useful when you need to rename a TFC Organization without | |
# wanting to (or being able to) start from scratch. | |
# | |
# Use this script with care, as this request is carried out against the API, only. | |
# Check your (local) Terraform Resources for references to `OLD_TFC_ORG_NAME` and |
This code is based around a question posted on Twitter
terraform login
.main.tf
using terraform apply
.get-terraform-cloud-output-values.sh
to retrieve the output values through the TFC API.