Skip to content

This project uses Terraform and GitHub Actions to build and validate a data infrastructure on AWS. The CI pipeline automates code verification for provisioning an S3 bucket and a Glue catalog, establishing a solid, version-controlled foundation for data engineering projects.

Notifications You must be signed in to change notification settings

joaovnovais/terraform-aws-data-infra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Infrastructure as Code with Terraform and CI/CD

This project demonstrates the automated creation of cloud infrastructure on AWS using Terraform and GitHub Actions (CI).
It is part of a practical portfolio focused on Data Engineering, emphasizing Infrastructure as Code (IaC) best practices and provisioning automation.

Objective

Automatically provision the following AWS resources:

  • S3 Bucket to store raw and processed data.
  • AWS Glue Catalog Database for future data analysis via Athena.
  • CI/CD Pipeline using GitHub Actions to validate and format Terraform code on every push or pull request.

Technologies & Tools

Category Technologies
IaC Terraform
CI/CD GitHub Actions
Cloud AWS S3, AWS Glue Catalog
Environment Ubuntu via WSL2
Version Control Git + GitHub

Project Structure

projeto4_terraform_infra/
├── main.tf                # Main Terraform configuration
├── variables.tf           # Variable definitions
├── outputs.tf             # Terraform outputs
├── .github/
│   └── workflows/
│       └── terraform.yml  # CI pipeline for validation
└── HISTORICO.md           # Commit history of the project

Key Features

Terraform

  • Creates an S3 bucket with a unique name and configurable policies.
  • Creates a Glue database with name and description defined via variables.
  • Fully parameterized for reusability and portability.

Continuous Integration (CI)

The terraform.yml workflow runs automatically on each push or pull request:

terraform init        # Initialize Terraform environment
terraform validate    # Validate configuration syntax
terraform fmt -check  # Check formatting
terraform plan        # Generate execution plan
terraform apply       # (Optional) Apply changes on main branch

How to Run Locally

Requirements:

  • AWS CLI configured
  • Terraform installed

Steps:

# Navigate to the project folder
cd terraform

# Initialize Terraform
terraform init

# Validate and preview changes
terraform validate
terraform plan

# Apply infrastructure
terraform apply

Security

  • This project does not use Terraform Cloud or store sensitive secrets.
  • All executions run through GitHub Actions and local Terraform, ensuring security and portability.

About

This project uses Terraform and GitHub Actions to build and validate a data infrastructure on AWS. The CI pipeline automates code verification for provisioning an S3 bucket and a Glue catalog, establishing a solid, version-controlled foundation for data engineering projects.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages