- take the code from the previous workshop -> https://gist.github.com/veggiemonk/097890ff101a995f3c31f4d25b69665e
- install terraform 0.12 => https://releases.hashicorp.com/terraform/0.12.3/terraform_0.12.3_linux_amd64.zip
- convert it to Terraform 0.12 by using the command
terraform 0.12upgrade
- make sure it works (
terraform plan
,terraform apply
andterraform destroy
) - spit into modules. https://www.terraform.io/docs/modules/index.html
- manually go into the console, create a small VM and try to import it into the terraform state -> see https://www.terraform.io/docs/import/usage.html
- destroy everything.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Best tips and tricks for bash ==> https://github.com/gruntwork-io/bash-commons | |
BASE_URL="https://git.netent.com/rest/api/1.0" | |
AUTHZ=${AUTHZ:?"AUTHZ var is not defined, it should contain the base64 encoded \`username:password\`"} | |
H_JSON="accept: application/json" | |
H_AUTHZ="Authorization: Basic $AUTHZ" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[core] | |
pager = diff-so-fancy | less --tabs=4 -RFX | |
excludesfile = ~/.gitignore | |
[user] | |
name = Julien Bisconti | |
email = | |
signingkey = XXX | |
[includeIf "gitdir:~/code/bitbucket/"] | |
path = ~/code/bitbucket/.gitconfig |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: atlantis | |
labels: | |
app: atlantis | |
spec: | |
type: LoadBalancer | |
loadBalancerIP: ${load_balancer_ip} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:alpine AS builder | |
ENV TERRAGRUNT_VERSION=0.19.9 \ | |
TERRAGRUNT_VERSION_SHA256SUM=9226cffc6b67b48c78e659b8ed1228e41b01c6fa4bd55e26e3b56c4d488db7ea \ | |
TERRAFORM_VERSION=0.12.5 \ | |
TERRAFORM_VERSION_SHA256SUM=babb4a30b399fb6fc87a6aa7435371721310c2e2102a95a763ef2c979ab06ce2 | |
WORKDIR /go/src/github.com/runatlantis/atlantis/ | |
RUN apk --no-cache add \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind: PodDisruptionBudget | |
metadata: | |
name: my-app | |
spec: | |
maxUnavailable: 1 | |
selector: | |
matchLabels: | |
app: my-app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:alpine AS builder | |
ARG GITHUB_USER | |
ARG REPO_NAME | |
WORKDIR /go/src/github.com/$GITHUB_USER/$REPO_NAME/ | |
COPY . . | |
RUN apk add --no-cache \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for r in *; | |
do { | |
echo ">>> $r" && \ | |
cd $r && \ | |
(git pull || echo 0) && \ | |
cd .. | |
}; | |
done; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"fmt" | |
"net" | |
"net/http" | |
"os" | |
"os/signal" | |
"runtime" |
- have fun with them
- projections
- filters
- resource-keys
- scripting-gcloud
- gcloud alpha interactive
- https://medium.com/@Joachim8675309/getting-started-with-gcloud-sdk-part-1-114924737
- https://medium.com/@Joachim8675309/getting-started-with-gcloud-sdk-part-2-4d049a656f1a
- https://gist.github.com/bborysenko/97749fe0514b819a5a87611e6aea3db8