Skip to main content

Infrastructure Scripts: Automate Infrastructure

Infrastructure scripts use Terraform, Ansible. Automate infrastructure.

Here's the thing: Infrastructure scripts automate infrastructure. Learn patterns. Use them.

Terraform

#!/bin/bash
terraform init
terraform plan
terraform apply

My take: Terraform scripts automate. Use them.

Ansible

#!/bin/bash
ansible-playbook playbook.yml

My take: Ansible scripts automate. Use them.

Common Patterns

Provision Infrastructure

provision() {
terraform init
terraform apply -auto-approve
}

What's Next?

Now that you understand infrastructure scripts, you can automate infrastructure. Or review DevOps Integration to reinforce.


Personal note: Infrastructure scripts seemed complex at first. Then I learned them. Now I use them. They're useful. Learn them.