Skip to content

This is a collection of scripts and tools to help with the development of the deployment of the code infrastructure.

License

Notifications You must be signed in to change notification settings

Al3xDiaz/code-infrastructure

Repository files navigation

TERRAFORM

terraform init

docker-compose run --rm  --entrypoint terraform terraform init -upgrade
#validate
docker-compose run --rm  --entrypoint terraform terraform validate
#plan
docker-compose run --rm  --entrypoint terraform terraform plan
#apply
docker-compose run --rm  --entrypoint terraform terraform apply --auto-approve
#Output
docker-compose run --rm --entrypoint terraform terraform output
# Destroy the infrastructure.
docker-compose run --rm  --entrypoint terraform terraform apply -destroy -auto-approve
#configure kubectl
aws eks --region us-east-2 update-kubeconfig --name $(docker-compose run --rm  --entrypoint terraform terraform output -raw cluster_name)

configure aws

iam user

  • create user with programmatic access
  • create group with policy "AmazonEC2FullAccess" (or more restrictive)
  • add user to group

aws cost explorer

create budget

create cost alarm

  • aws > cost explorer > budget > create budget
  • name: "terraform"
  • budget type: cost
  • budgeted amount: $1

Ansible

commands

docker-compose run --rm ansible ansible-playbook main.yml --check

About

This is a collection of scripts and tools to help with the development of the deployment of the code infrastructure.

Topics

Resources

License

Stars

Watchers

Forks