Skip to content

Instantly share code, notes, and snippets.

View antonbabenko's full-sized avatar
🇺🇦

Anton Babenko antonbabenko

🇺🇦
View GitHub Profile
@antonbabenko
antonbabenko / gist:8eca477d28340d5116a2cd776bfd5e65
Last active May 7, 2020 08:32
AWS Cloudfront wishlist (due 19.5.2020)
1. Faster cache invalidation (eg, like stackpath has, for example). Maybe add flag to disable blocking which is helpful when using in automation? - Denis S.
2. Add brotli compression - Anton K.
3. Why different POPs have different distribution settings? Canada and Dallas sometimes have gzip disabled. - Anton K.
4. Allow to specify "latest" as version of AWS Lambda functions. - Uriah S.
@antonbabenko
antonbabenko / .bash_profile
Last active May 2, 2023 11:24
Make your terragrunt output useful
# 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
@antonbabenko
antonbabenko / ecs-codedeploy
Last active November 16, 2022 23:25
This script performs deployment of ECS Service using AWS CodeDeploy
#!/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
2018/01/17 12:16:50 [INFO] Terraform version: 0.11.2 a6008b8a48a749c7c167453b9cf55ffd572b9a5d
2018/01/17 12:16:50 [INFO] Go runtime version: go1.9.1
2018/01/17 12:16:50 [INFO] CLI args: []string{"/usr/local/Cellar/tfenv/0.6.0/versions/0.11.2/terraform", "init"}
2018/01/17 12:16:50 [DEBUG] Attempting to open CLI config file: /Users/Bob/.terraformrc
2018/01/17 12:16:50 Loading CLI configuration from /Users/Bob/.terraformrc
2018/01/17 12:16:50 [INFO] CLI command args: []string{"init"}
2018/01/17 12:16:50 [DEBUG] command: loading backend config file: /Users/Bob/Sites/terracing-test-repo/terraform
2018/01/17 12:16:50 [TRACE] module source: "terraform-aws-modules/security-group/aws//modules/http-80"
2018/01/17 12:16:50 [TRACE] "terraform-aws-modules/security-group/aws//modules/http-80" is a registry module
2018/01/17 12:16:50 [INFO] no matching version for "terraform-aws-modules/security-group/aws//modules/http-80"<>, no versions found
@antonbabenko
antonbabenko / gist:fc8b73b2086f488014b1a8b4de842863
Last active November 21, 2017 10:16
Upcoming HashiCorp User Group Oslo meetups
https://www.meetup.com/Oslo-HashiCorp-User-Group
20.11.2017 - Terraform Q&A - https://www.meetup.com/Oslo-HashiCorp-User-Group/events/243890303
* Anton Babenko, https://twitter.com/antonbabenko
Beginning/middle of January - Packer:
* Anders Bruvik, https://twitter.com/bruvik
* Marek Piątek, https://twitter.com/piontas
* Anton Babenko, https://twitter.com/antonbabenko
@antonbabenko
antonbabenko / README.md
Created October 31, 2017 08:45
Example of using terraform-aws-modules/vpc/aws module with Terragrunt

This is an example of how to use Terraform AWS registry modules with Terragrunt.

Notes:

  1. source has to be full git URL and not Terraform Registry open issue #311
  2. File main_providers.tf is named so, because it will be copied to another local directory and merged with module's code. If such file exists in the module already then it will overwrite the one provided by the module.

Keybase proof

I hereby claim:

  • I am antonbabenko on github.
  • I am antonbabenko (https://keybase.io/antonbabenko) on keybase.
  • I have a public key ASBBrIE8mpSuelQ7SEJlvzVtP2gEpcAI706U-i-NhVVHNQo

To claim this, I am signing this object:

@antonbabenko
antonbabenko / crash.log
Created November 29, 2016 11:21
terragrunt 0.3.0 crash
[terragrunt] 2016/11/29 12:20:08 Reading Terragrunt config file at .terragrunt
[terragrunt] 2016/11/29 12:20:08 Initializing remote state for the s3 backend
fatal error: unexpected signal during runtime execution
[signal 0xb code=0x1 addr=0xb01dfacedebac1e pc=0xef1b]
runtime stack:
runtime.throw(0x71adc0, 0x2a)
/usr/local/go/src/runtime/panic.go:547 +0x90
runtime.sigpanic()
/usr/local/go/src/runtime/sigpanic_unix.go:12 +0x5a
@antonbabenko
antonbabenko / crash.log
Created October 20, 2016 08:15
fatal error: fault
[terragrunt] 2016/10/20 10:12:21 Remote state is already configured for backend s3
[terragrunt] 2016/10/20 10:12:21 Attempting to acquire lock for state file xxxxxxxxxxxxxxxxxxxxxxx in DynamoDB
unexpected fault address 0xb01dfacedebac1e
fatal error: fault
[signal 0xb code=0x1 addr=0xb01dfacedebac1e pc=0x59937]
goroutine 11 [running]:
runtime.throw(0x5ceef0, 0x5)
/usr/local/go/src/runtime/panic.go:547 +0x90 fp=0xc82002ef68 sp=0xc82002ef50
runtime.sigpanic()
@antonbabenko
antonbabenko / crash.log
Created October 11, 2016 12:09
terragrunt 0.1.1
fatal error: unexpected signal during runtime execution
[signal 0xb code=0x1 addr=0xb01dfacedebac1e pc=0xef1b]
runtime stack:
runtime.throw(0x679a40, 0x2a)
/usr/local/go/src/runtime/panic.go:547 +0x90
runtime.sigpanic()
/usr/local/go/src/runtime/sigpanic_unix.go:12 +0x5a
runtime.unlock(0x8966c0)
/usr/local/go/src/runtime/lock_sema.go:107 +0x14b