Author Archives: anuj
Workspaces in TerraforM
workspaces allow you to manage multiple environments or configurations within a single Terraform configuration directory. Each workspace maintains its own state file, enabling you to isolate environments such as development,…
GitHub Actions versus GitLab CI/CD
GitHub Actions and GitLab CI/CD are both popular tools used for Continuous Integration (CI) and Continuous Deployment (CD) in software development. They automate the process of building, testing, and deploying…
Resource Shutdown via terraform
Terraform is often used to destroy environments - which keeps the state file consistent, when the next create event needs to occur. However, sometimes, instead of destroying resources, all you…
Terraform for IAM resource creation
Overview Is terraform a suitable tool for creating and managing cloud IAM resources? The short answer is - no. Especially, if you are going to be dealing with a large…
Error: retrieving `contact` for KeyVault: keyvault.BaseClient#GetCertificateContacts: Failure sending request: StatusCode=0 — Original Error: context deadline exceeded
When creating a key vault in Azure using terraform, you may encounter this error Error: retrieving `contact` for KeyVault: #GetCertificateContacts data "azurerm_client_config" "current" {} resource "azurerm_key_vault" "my_key_vault" { name …
Retrieving Resource IDs in Terraform – The Terraform Data Block
Also read - Terraform external data querying The Terraform Data Block - Retrieving a Project Id for a GCP project data "google_project" "project" { } output "project_number" { value =…
tfvars versus variables.tf
Prompting a user for Input in Terraform To me, the primary use case is that I want to prompt a user to provide the value for the input variable. In…
VS Code does not pick up the latest terraform version
From a powershell prompt, get the current executable path for terraform using: Get-Command terraform If this is pointing to the older terraform version, simply delete the older file. ReInstall the…
VS Code Scripts Error: Cannot be loaded because running scripts is disabled on this system
VS Code Terminal displays this error Cannot be loaded because running scripts is disabled on this system If you want to continue using powershell as the terminal, you will need…
Error – ‘registry.terraform.io/hashicorp/local: there is no package for registry.terraform.io/hashicorp/local cached in .terraform/providers’
Terraform init or terraform init -upgrade or terraform apply fails with this error message: The installed provider plugins are not consistent with the packages selected in the dependency lock file:…