Skip to content

Instantly share code, notes, and snippets.

@djaboxx
djaboxx / gtag
Created May 10, 2024 17:50
Automatic Repo Tagging
#!/usr/bin/env python3
import semantic_version
import subprocess
import os
def main(message, major, minor, patch):
os.chdir(os.getcwd())
repo_dir = os.path.basename(os.getcwd())
print(f"working in {repo_dir}")
if not message:

Keybase proof

I hereby claim:

  • I am djaboxx on github.
  • I am happypathway (https://keybase.io/happypathway) on keybase.
  • I have a public key ASCht8lPCyPMuql6ZMItvgg_2O4qBs0qNWUNGRQqJ6DsuQo

To claim this, I am signing this object:

#!/usr/local/bin/python
import requests
import os
import json
import sys
import hcl
def hcl_config(api, config):
with open(os.path.abspath(config), 'r') as fp:
obj = hcl.load(fp)
@djaboxx
djaboxx / ssh_failure.txt
Created October 3, 2018 05:25
ssh failure
URL: PUT http://18.206.200.57:8200/v1/ssh-dev/config/ca
Code: 500. Errors:
* 1 error occurred:
* keys are already configured; delete them before reconfiguring
@djaboxx
djaboxx / terraform-openstack-vm.tf
Created September 28, 2018 02:35
a simple Terraform Configuration file to launch a VM in OpenStack
variable "OS_AUTH_URL" {}
variable "OS_PASSWORD" {}
variable "OS_TENANT_NAME" {}
variable "OS_USERNAME" {}
variable "OS_KEYPAIR" {}
variable "OPENSTACK_PROVIDER_NET" {}
variable "vm_name" {}
variable "flavor_name" {}
# Configure the OpenStack Provider
@djaboxx
djaboxx / terraform.tfvars
Last active September 5, 2018 21:06
Simple Variables file for setting up new workspace with code from https://gist.github.com/djaboxx/e4a615acded0b71e2c6fb79f20d8579c
github_org="<github_org>"
organization="<tfe_org_name>"
create_instance_repo="<aws_instance_repo>"
instance_name="<aws_instance_name>"
team_name="<tfe_team_name>"
members=[""]
workspace_name="<tfe_workspace_name>"
@djaboxx
djaboxx / oauth_tokens_requirements.txt
Created September 5, 2018 18:53
Requirements.txt file for installing requirements for oauth_tokens.py script
requests
pyhcl
@djaboxx
djaboxx / oauth_tokens.py
Created September 5, 2018 18:51
Simple Python Script to find TFE Oauth Tokens from Terraform Enterprise
#!/usr/local/bin/python
import requests
import os
import json
import sys
import hcl
def hcl_config(api, config):
with open(os.path.abspath(config), 'r') as fp:
obj = hcl.load(fp)
@djaboxx
djaboxx / main.tf
Created September 5, 2018 18:40
Simple Terraform Configuration to create 1 ec2 instance with Name tag
provider "aws" {
region = "us-west-2"
}
variable "instance_name" {
type = "string"
description = "Name of EC2 Instance"
}
data "aws_ami" "ubuntu" {
@djaboxx
djaboxx / main.tf
Last active September 5, 2018 21:01
Simple Terraform Config to create a workspace with one variable and enabling admin access for one team
variable "github_org" {
type = "string"
description = "GitHub Organization"
}
variable "organization" {
type = "string"
description = "Terraform Enterprise Organization"
}