Skip to content

Instantly share code, notes, and snippets.

@weyderfs
Last active May 24, 2023 18:30
Show Gist options
  • Save weyderfs/588f887d0c57f2ce1779eb4a28d8afb7 to your computer and use it in GitHub Desktop.
Save weyderfs/588f887d0c57f2ce1779eb4a28d8afb7 to your computer and use it in GitHub Desktop.
Terragrunt_Terraform Imports samples from AWS
# Importing a Route53 Record
$ terragrunt import aws_route53_record.record HOSTZONEIDXXXXXXX_my-record.my-domaym_CNAME
# Generate a Random String
$ cat /dev/urandom | tr -dc '[:alpha:]' | fold -w ${1:-20} | head -n 1
# Turns your `git log` more Pretty
$ git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"
## Examples of use
git lg
git lg -p
# Git Switch - (Quando você commita direto na Master e esquece de dar checkout na outra branch)
- git lg
- git checkout no hash do commit
- git switch -c nova-branch
# Movendo commit para outra branch
# Note: Any changes not committed will be lost.
git branch newbranch # Create a new branch, saving the desired commits
git reset --hard HEAD~3 # Move master back by 3 commits (Make sure you know how many commits you need to go back)
git checkout newbranch # Go to the new branch that still has the desired commits
# Deletando todas branches locais menos a master
git branch | grep -v "master" | xargs git branch -D
# Terragrunt FMT
$ terragrunt hclfm terragrunt.hcl
@weyderfs
Copy link
Author

weyderfs commented Oct 1, 2021

Terraform and Terragrunt AWS imports samples

@weyderfs
Copy link
Author

weyderfs commented Oct 5, 2022

Added examples of the use git log command enhancement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment