Skip to content

Instantly share code, notes, and snippets.

View Raviadonis's full-sized avatar
🏠
Working from home

Ravichandran Raviadonis

🏠
Working from home
View GitHub Profile
@Raviadonis
Raviadonis / download_all_branches.sh
Created December 26, 2021 15:59 — forked from doulmi/download_all_branches.sh
Download All branches
#!/bin/bash
set -x #echo on
remote_url=$(git config --get remote.origin.url)
for branch in $(git branch --all | grep '^\s*remotes' | egrep --invert-match '(:?HEAD|master)$'); do
branch_name=$(echo $branch| cut -d'/' -f 3)
git clone -b $branch_name $remote_url $branch_name
done
@Raviadonis
Raviadonis / clone-repos-generate.sh
Created December 24, 2021 07:54 — forked from eeichinger/clone-repos-generate.sh
Generate a script to clone all repos within a specific project from bitbucket server and bitbucket cloud
# generate a script ./clone-repos.sh from a list of repos fetched via Bitbucket API
# note: requires 'curl' and 'jq' to be installed
set -e
echo -n '' > clone-repos.sh
chmod +x clone-repos.sh
ONPREM_USER=xxxxx
ONPREM_PASS=......
@Raviadonis
Raviadonis / Packer.log
Created May 26, 2020 06:32
Packer log
05:58:44.422 1590472724,,ui,error,\n==> Some builds didn't complete successfully and had errors:
05:58:44.425 1590472724,amazon-ebs,error,Error querying AMI: InvalidAMIID.Malformed: Invalid id: "<!-- IE friendly error message walkround. \n if error message from server is less than \n 512 bytes IE v5+ will use its own error \n message instead of the one returned by \n server. --> \n \n \n \n \n \n \n<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">\n<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><style type="text/css">html%!(PACKER_COMMA)body{height:100%;padding:0;margin:0;}.oc{display:table;width:100%;height:100%;}.ic{display:tab
@Raviadonis
Raviadonis / trace.log
Created May 17, 2020 07:37
Terraform DEBUG output
2020/05/17 03:18:31 [INFO] Terraform version: 0.12.25
2020/05/17 03:18:31 [INFO] Go runtime version: go1.12.13
2020/05/17 03:18:31 [INFO] CLI args: []string{"/opt/terraform", "plan", "-destroy"}
2020/05/17 03:18:31 [DEBUG] Attempting to open CLI config file: /home/cloud_user/.terraformrc
2020/05/17 03:18:31 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/05/17 03:18:31 [INFO] CLI command args: []string{"plan", "-destroy"}
2020/05/17 03:18:31 [TRACE] Meta.Backend: no config given or present on disk, so returning nil config
2020/05/17 03:18:31 [TRACE] Meta.Backend: backend has not previously been initialized in this working directory
2020/05/17 03:18:31 [DEBUG] New state was assigned lineage "8cd74949-e531-599b-3222-0994df8072c6"
2020/05/17 03:18:31 [TRACE] Meta.Backend: using default local state only (no backend configuration, and no existing initialized backend)
@Raviadonis
Raviadonis / iam_user.tf
Last active December 30, 2019 10:41
IAM user creation in AWS using modules
# AWS IAM User Creation
module "create_user" {
source = "../../dev/users" # Destination resource file under the directory
names = ["${var.user_name}"]
new_name = "${var.new_name}"
group_name = "${var.groups}"
}