Skip to content

Instantly share code, notes, and snippets.

View ksummersill2's full-sized avatar
💭
Happy and coding

Kevin Summersill ksummersill2

💭
Happy and coding
View GitHub Profile
@ksummersill2
ksummersill2 / dynamo.tf
Created June 23, 2020 03:45
Create DynamoDB Table for Terraform State management
resource "aws_dynamodb_table" "terraform_state_lock" {
name = "terraform-lock"
read_capacity = 5
write_capacity = 5
hash_key = "LockID"
billing_mode = "PAY_PER_REQUEST"
attribute {
name = "LockID"
type = "S"
}
@ksummersill2
ksummersill2 / S3.tf
Created June 23, 2020 03:44
S3 Bucket resource for Terraform State
# S3 Bucket Used by the Terraform State Management
# Must be initialized first prior to uncommiting the configuration for terraform
resource "aws_s3_bucket" "devsecops-bc-state" {
bucket = "devsecops-bc-state"
versioning {
enabled = true
}
server_side_encryption_configuration {
rule {
apply_server_side_encryption_by_default {
@ksummersill2
ksummersill2 / main.tf
Created June 23, 2020 03:40
Setups the S3 Backend Terraform State Management
# State Module
module "state" {
source = ".//modules/state"
}
# Configure Terraform to push production state to an S3 bucket.
terraform {
backend "s3" {
bucket = "<name of your bucket>"
key = "terraform.state"
@ksummersill2
ksummersill2 / install-chef-12-6-0-amazon-linux
Created April 4, 2019 19:13 — forked from rtacconi/install-chef-12-6-0-amazon-linux
Install chef server 12.6.0 on Amazon Linux
echo "127.0.0.1 AWSVC009 AWSVC009" >> /etc/hosts
yum update -y
wget https://packages.chef.io/stable/el/5/chef-server-core-12.6.0-1.el5.x86_64.rpm
rpm -Uvh chef-server-core-12.6.0-1.el5.x86_64.rpm
chef-server-ctl reconfigure
mkdir /home/ec2-user/cookbooks
chown ec2-user /home/ec2-user/cookbooks
mkdir /home/ec2-user/.chef
chown ec2-user /home/ec2-user/.chef