we’ll explore moving resources from a single Terraform state file to three separate state files—Development, Preproduction, and Production. The goal is to manage resources across different environments effectively, using GitLab, HashiCorp Vault, and Infrastructure as Code (IaC) with Terraform.
Author: realworldit
Guide for adding environment-specific variables in Terraform
This guide provides an overview of managing environment variables in Terraform, covering two common approaches (using a single environments.auto.tfvars file and separate environment files), as well as an alternative approach with Terraform Workspaces.
Coding for Beginners or Advanced – A Standard set files for your projects
This might not apply to your projects but as a DevOps Engineer I think it’s good to have a standard set of files/folders for each of my projects. It keeps things tidy and helps me. This list is based on my projects using Terraform, GitLab, Docker, Packer, git and more. Here’s a brief explanation of […]
Script to add to Windows Explorer Quick Access
Script automates adding folders to Windows Explorer’s Quick Access, streamlining new server setup; just list paths and update the array.
Load Balancing Applications with Minikube: From Simple to Advanced
Minikube is a popular tool for running Kubernetes locally, allowing developers to test and develop applications in a Kubernetes environment on their personal computers. One of the key features of Kubernetes is its ability to load balance traffic across multiple instances of an application, ensuring reliability and availability. This article explores the different ways you […]
Push an existing git repository to another.
If you need to move a repo from one to another, use the following code To push to an existing folder To create a new repository Setting the git global setup Job done!
Transfer files using the RDP clipboard when it’s blocked.
Afternoon, Morning and Evening depending on when you are reading this. I’ve come across this one recently and thought I would post it. You know those situations where you need to copy a file from a machine, but can’t as it’s blocked in RDP, but you can still copy text through RDP. Well, you still […]
Hashicorp Vault AWS auth backend role Terraform example, then access secret from the userdata instance.
AWS auth role in Vault is specifically designed for applications running on Amazon Web Services (AWS) infrastructure. It leverages AWS IAM roles to authenticate and authorize applications to access secrets in Vault. The key components of the AWS auth role are:
In PowerShell on a Windows machine, Create event logs and detect errors in my code.
You can create custom event logs in PowerShell using the New-EventLog cmdlet, and then use the Write-EventLog cmdlet to write events to the log. Here’s an example: In this example, the New-EventLog cmdlet is used to create a new event log named “MyScriptLog” with a source of “MyScript”. The Write-EventLog cmdlet is then used to […]
Terraform Example of a Windows Instance using UserData
Here is an example Terraform code for launching a Windows instance that uses userdata to configure the instance: