Modrentalking / Diplom_IaC

0 stars 0 forks source link

Diplom_IaC

Infrastructure as Code with Terraform

This repository contains code for deploying infrastructure using Terraform. It creates a Kubernetes cluster in Google Cloud with two node pools: a default node pool for deploying the Hello World HTTP Server application and a logging node pool for logging this application.

alt text

Prerequisites

Before running the Terraform code, make sure you have the following:

Google Cloud Storage Bucket

To store the Terraform state, you need to create a Google Cloud Storage bucket. If you are creating the bucket in another project, grant access permissions to your service account using the following command:

   gsutil acl ch -u <service accoiunt>:FC gs://<name of bucket>    

GitHub Actions Pipeline

This repository includes a GitHub Actions pipeline for automatic infrastructure deployment. The pipeline consists of the following stages:

  1. terraform init: Initializes Terraform and sets up the backend for storing the state.
  2. terraform plan: Generates an execution plan for creating the infrastructure.
  3. Manual terraform apply: Applies the changes to create the infrastructure. This step requires manual intervention.