https://github.com/al3xdiaz/code-infrastructure
This is a collection of scripts and tools to help with the development of the deployment of the code infrastructure.
https://github.com/al3xdiaz/code-infrastructure
ansible-project devops terraform
Last synced: about 2 months ago
JSON representation
This is a collection of scripts and tools to help with the development of the deployment of the code infrastructure.
- Host: GitHub
- URL: https://github.com/al3xdiaz/code-infrastructure
- Owner: Al3xDiaz
- License: mit
- Created: 2021-09-28T20:42:52.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-03-09T23:47:46.000Z (about 1 year ago)
- Last Synced: 2025-08-05T10:41:35.109Z (8 months ago)
- Topics: ansible-project, devops, terraform
- Language: HCL
- Homepage:
- Size: 133 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TERRAFORM
terraform init
```bash
docker-compose run --rm --entrypoint terraform terraform init -upgrade
```
```bash
#validate
docker-compose run --rm --entrypoint terraform terraform validate
```
```bash
#plan
docker-compose run --rm --entrypoint terraform terraform plan
```
```bash
#apply
docker-compose run --rm --entrypoint terraform terraform apply --auto-approve
```
```bash
#Output
docker-compose run --rm --entrypoint terraform terraform output
```
```bash
# Destroy the infrastructure.
docker-compose run --rm --entrypoint terraform terraform apply -destroy -auto-approve
```
```bash
#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
```bash
docker-compose run --rm ansible ansible-playbook main.yml --check
```