๐Ÿ“ฆ anna-geller / kestra-terraform-examples

Bring Infrastructure as Code best practices to your data workflows with Kestra and Terraform

โ˜… 5 stars โ‘‚ 0 forks ๐Ÿ‘ 5 watching โš–๏ธ MIT License
automationawsdata-engineeringdata-infrastructuredata-orchestrationinfrastructure-as-codekestraplatform-engineeringterraformworkflow-as-codeworkflow-orchestration
๐Ÿ“ฅ Clone https://github.com/anna-geller/kestra-terraform-examples.git
HTTPS git clone https://github.com/anna-geller/kestra-terraform-examples.git
SSH git clone git@github.com:anna-geller/kestra-terraform-examples.git
CLI gh repo clone anna-geller/kestra-terraform-examples
Anna Geller Anna Geller airbyte b618000 2 years ago ๐Ÿ“ History
๐Ÿ“‚ main View all commits โ†’
๐Ÿ“ airbyte
๐Ÿ“ aws_dynamodb
๐Ÿ“ aws_s3
๐Ÿ“ aws_sns
๐Ÿ“ aws_sqs
๐Ÿ“ images
๐Ÿ“„ .env_example
๐Ÿ“„ .gitignore
๐Ÿ“„ docker-compose.yml
๐Ÿ“„ LICENSE
๐Ÿ“„ README.md
๐Ÿ“„ README.md

Data Infrastructure as Code

There are two important paradigms that significantly shaped the Data Infrastructure landscape:

  • Infrastructure as Code
  • Workflow as Code
Combining the two helps implement a reliable data engineering lifecycle with:
  • reliable infrastructure management
  • data pipelines built as code
  • version control of both, data workflows and the underlying infrastructure.
This repository includes examples helping you adopt both of these paradigms at the same time.

Install Kestra

You can start Kestra using Docker-Compose:

curl -o docker-compose.yml https://raw.githubusercontent.com/kestra-io/kestra/develop/docker-compose.yml

docker-compose up

Before starting Kestra, make sure to create the .env file as shown in the .envexample file. Add any secrets there as environment variables so that you can use them in your workflows in a secure way.

Install Terraform

You can install Terraform on your local machine using Homebrew (for detailed instructions of your OS, check the Terraform CLI install guide Terraform):

brew tap hashicorp/tap
brew install hashicorp/tap/terraform

install.png

Write in code, deploy in one command

Navigate to the relevant project e.g. awss3tf and initialize the relevant Terraform providers:

cd aws_s3/
terraform init

Then, deploy the workflow and the underlying infrastructure using the command:

terraform apply -auto-approve