This file contains 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
more_set_headers "Access-Control-Allow-Origin: $http_origin"; | |
more_set_headers "Access-Control-Allow-Credentials: true"; | |
# OPTIONS indicates a CORS pre-flight request | |
if ($request_method = 'OPTIONS') { | |
more_set_headers "Access-Control-Max-Age: 1728000"; | |
more_set_headers "Access-Control-Allow-Methods: GET, POST, PUT, DELETE, PATCH, OPTIONS"; | |
more_set_headers "Access-Control-Allow-Headers: Authorization,Content-Type,Accept,Origin,User-Agent,DNT,Cache-Control,X-Mx-ReqToken,Keep-Alive,X-Requested-With,If-Modified-Since"; | |
more_set_headers "Content-Length: 0"; |
This file contains 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
# Put this function in your ~/.bash_profile or similar and use `terragrunt` as before. | |
# From: https://github.com/gruntwork-io/bash-commons/blob/master/modules/bash-commons/src/array.sh | |
# Returns 0 if the given item (needle) is in the given array (haystack); returns 1 otherwise. | |
array_contains() { | |
local -r needle="$1" | |
shift | |
local -ra haystack=("$@") | |
local item |
This file contains 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 | |
while read LINE; do | |
curl -o /dev/null --silent --progress-bar --head --write-out '%{http_code} %{time_starttransfer} %{url_effective}\n' "$LINE" >> urls_result.txt | |
done < urls.txt |
This file contains 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
const redirectMap = new Map([ | |
['/issues/weekly-tf-issue-101-best-practices-for-using-terraform-by-google-the-many-ways-to-access-rds-artificial-intelligence-infrastructure-as-code-generator-1473757', 'https://www.weekly.tf/p/weeklytf-issue-101-best-practices-using-terraform-google-many-ways-access-rds-artificial-intelligenc'], | |
['/issues/weekly-tf-issue-100-using-least-privilege-iam-policies-aws-sam-cli-and-terraform-managing-terraform-state-with-terragrunt-ci-cd-pipeline-in-azure-devops-achieving-balance-with-policy-enforcement-aws-re-invent-1463043', 'https://www.weekly.tf/p/weeklytf-issue-100-using-least-privilege-iam-policies-aws-sam-cli-terraform-managing-terraform-state'], | |
['/issues/weekly-tf-issue-99-aws-landing-zone-codify-your-infrastructure-with-terraformer-and-terraform-best-practices-gitlab-managed-terraform-state-terrascan-aws-nat-instances-ci-cd-pipelines-for-infrastructure-as-code-with-kief-morris-1448446', 'https://www.weekly.tf/p/weeklytf-issue-99-aws-landing-zone-codify-infrastructure-terrafo |
This file contains 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 | |
####################################################################### | |
# This script performs deployment of ECS Service using AWS CodeDeploy | |
# | |
# Heavily inspired by https://github.com/silinternational/ecs-deploy , | |
# which unfortunately can't be used to deploy ECS service when `deployment_option=ECS` | |
# | |
# Author: Anton Babenko | |
# URL: https://github.com/antonbabenko |
This file contains 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 | |
set -e | |
readonly CONTENT_MAIN_TF='module "wrapper" {}' | |
readonly CONTENT_VARIABLES_TF='variable "items" { | |
description = "Maps of items to create a wrapper from. Values are passed through to the module." | |
type = any | |
default = {} | |
}' |
This file contains 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
1. Big success = incredible growth = big investment -> higher risk of losing the pure spirit of open-source + open community. What are the comming actions to reduce this risk and not reproduce the same failing pattern of Docker Inc? / via H. |
This file contains 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
# - repo: local # @todo: move to pre-commit-terraform, add support for multiple module dirs, and run before terraform_docs | |
# hooks: | |
# - id: terraform_wrapper | |
# name: "Terraform module wrapper - root" | |
# entry: /Users/Bob/Sites/terraform-aws-modules/scripts/generate-terraform-wrappers.sh --overwrite | |
# language: system | |
# pass_filenames: false | |
# - id: terraform_wrapper | |
# name: "Terraform module wrapper - object" | |
# entry: /Users/Bob/Sites/terraform-aws-modules/scripts/generate-terraform-wrappers.sh --module-dir modules/object --overwrite |
This file contains 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 | |
# If you are using some terraform-aws-modules, pre-commit-terraform, or other projects I am heavily involved into | |
# please consider support me on GitHub Sponsors or any other platform! | |
# | |
# Here you can see most of my projects - https://github.com/antonbabenko/terraform-aws-devops | |
find . -type f \( -name "*.tf" -o -name "*.yaml" \) -and \( -not -path "*/.terraform/*" \) -exec \ | |
grep -E 'terraform-aws-modules|antonbabenko/pre-commit-terraform' -q {} + && \ | |
echo "Found some references... You are using some open-source projects by Anton, please support @antonbabenko" && \ |
This file contains 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
resource "aws_db_instance" "valid_but_ugly" { | |
allocated_storage = 20 | |
storage_type = "gp2" | |
engine = "mysql" | |
engine_version = "5.7" | |
instance_class = "db.t2.micro" | |
# flip value to true/false will return multiple violations. | |
iam_database_authentication_enabled = local.test2.some[0] == "dd" #tobool("true") | |
#(true == true) |
NewerOlder