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
| locals { | |
| input = { | |
| "projects" : { | |
| "another" : { | |
| "accounts" : [ | |
| "one", | |
| "two" | |
| ] | |
| }, | |
| "test" : { |
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
| locals { | |
| virtual_machines = { | |
| "test-services1" = { | |
| vm_instance_group = "instance-group-services" | |
| }, | |
| "test-services2" = { | |
| vm_instance_group = "instance-group-services" | |
| }, | |
| "test-cpu" = { |
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
| variable "subnets" { | |
| type = list(any) | |
| default = ["subnet-a", "subnet-b", "subnet-c"] | |
| } | |
| variable "instances" { | |
| default = { | |
| TEST1 = { | |
| sg = ["example1"] |
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
| Apply complete! Resources: 0 added, 0 changed, 0 destroyed.[0m | |
| Outputs: | |
| map_output = { | |
| "1-a-4-d" = { | |
| "1" = "1" | |
| "2" = "a" | |
| "3" = "4" | |
| "4" = "d" | |
| } |
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
| # Pull in existing VPC | |
| data "aws_vpc" "selected" { | |
| id = var.vpc_id | |
| } | |
| # Subnet ids data source lookup allows multiple subnets to be provided | |
| data "aws_subnet_ids" "private" { | |
| vpc_id = data.aws_vpc.selected.id | |
| filter { |
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 "fmt" | |
| func main() { | |
| intslice := [][]int{[]int{1}, []int{2}} | |
| // Grow | |
| for index, value := range intslice { |
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
| import os | |
| import socket | |
| from OpenSSL import crypto, SSL | |
| # OpenVPN is fairly simple since it works on OpenSSL. The OpenVPN server contains | |
| # a root certificate authority that can sign sub-certificates. The certificates | |
| # have very little or no information on who they belong to besides a filename | |
| # and any required information. Everything else is omitted or blank. | |
| # The client certificate and private key are inserted into the .ovpn file | |
| # which contains some settins as well and the entire thing is then ready for |
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
| events { | |
| worker_connections 1024; | |
| } | |
| http { | |
| # google's DNS server | |
| resolver 8.8.8.8; | |
| resolver_timeout 5s; | |
| server { | |
| # proxy server port |
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 | |
| # | |
| # Copyright (c) 2013 Nyr. Released under the MIT License. | |
| # Copyright (c) 2019 Fabrice Triboix | |
| set -eu | |
| ################### | |
| # Parse arguments # |
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
| function tfinit () { | |
| if [ -z "${1}" ]; then | |
| terraform init | |
| else | |
| terraform init -backend-config=${1} | |
| fi | |
| } | |
| function tfplan () { | |
| if [ -z "${1}" ]; then |
NewerOlder