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 […]
PowerShell
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.
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 […]
Setting Up Pester Tests
Hey, how are you doing? Thought I would write about setting up Pester tests, and the structure I use. This comes about because when I need to start a new project and have some Pester tests running against the infrastructure I have a standard setup I use. So I decided to share it as it […]
AKS Azure Kubernetes Services – Private AKS Endpoint.
Check out my github repo for an ARM Template that deploys AKS. https://github.com/PinportLtd/Kubernetes-AKS Private AKS Endpoint. If you enable the AKS private endpoint you can ensure network traffic between your API server and your node pools remains on the private network only. Which is great for security. But it also means your k8s API is […]
WinRM
WinRM seems a very complicated way to access a server. But it can be easier if you know the basics. Remote Machine – The Server you want to connect to To start on the machine you want to connect to, you need to set up WinRM and enable PSRemoting (PowerShell Remoting). This can be done […]
Querying API’s using PowerShell Commands
It’s always useful to have these commands at your fingertips when you need to get or post some information to an API. I’m going to cover three of Microsoft API’s here. Azure DevOps API Azure Rest API Azure Graph API The Azure DevOps API is used to interact with Azure DevOps; you can create release […]
Useful Azure Virtual Machine’s Images for Arm and Terraform Templates
I get stuck when considering which image to use for my virtual machines. Has a new image come out??? What options are available to me now? There are so many to choose from. To use virtual machine images, there are four parts that you need to find to reference them in your code. Publisher: The […]
Create an Azure Service Principal for Terraform
To use Azure and Terraform together you need a way to authenticate against the Azure Tenant. Like you do as a user, applications need a way to do the same. But instead of creating a user account, we create a Service Principal account. To do this we need to register an application in Azure Active Directory. […]