Jhooq
open-menu closeme
Home
Ansible
Kubernetes
Terraform
Google Cloud
YouTube
Tools
About
Contact
github twitter linkedin rss
  • terraform console: Evaluate Expressions, Functions and cidrsubnet Without Applying Anything (Terraform 1.17)

    calendar Oct 31, 2026 · 10 min read · Terraform  ·
    Last Modified : Oct 31, 2026
    Share on: twitter facebook linkedin copy
    terraform console: Evaluate Expressions, Functions and cidrsubnet Without Applying Anything (Terraform 1.17)

    TL;DR TL;DR terraform console evaluates one Terraform expression at a time against your configuration and state, and never modifies state. It needs no cloud credentials for pure functions such as cidrsubnet, format or lookup. Non-interactive use: echo 'cidrsubnet("10.0.0.0/16", 8, 3)' | terraform console …


    Read More
  • Terraform tls_private_key: Generate SSH Keys and Self-Signed Certificates with the tls Provider (Terraform 1.17)

    calendar Oct 30, 2026 · 9 min read · Terraform  ·
    Last Modified : Oct 30, 2026
    Share on: twitter facebook linkedin copy
    Terraform tls_private_key: Generate SSH Keys and Self-Signed Certificates with the tls Provider (Terraform 1.17)

    TL;DR TL;DR tls_private_key generates a key pair in Terraform itself. algorithm accepts RSA, ECDSA or ED25519; rsa_bits defaults to 2048 and ecdsa_curve defaults to P224. The private key is stored unencrypted in the state file. The provider documentation says so in a security notice, and I confirmed it: the marker …


    Read More
  • Azure Virtual Machine Course: Terraform Code for a Linux VM, VNet, NSG and Route Table (azurerm 5.x), Plus the Slides

    calendar Feb 17, 2025 · 13 min read · Azure Terraform  ·
    Last Modified : Nov 4, 2026
    Share on: twitter facebook linkedin copy
    Azure Virtual Machine Course: Terraform Code for a Linux VM, VNet, NSG and Route Table (azurerm 5.x), Plus the Slides

    TL;DR This page is the code and slide companion to my Azure Masterclass video: virtual machine, load balancer, scale set, VNet, subnet, route table and NSG. The Terraform below creates 10 resources in one resource group. Validated, not applied: on 2026-11-04 terraform validate with Terraform 1.17.1 passed for azurerm …


    Read More
  • Terraform Use Module Output as Input for Another Module: Wiring, Type Errors and the for_each Trap (Terraform 1.17)

    calendar Jun 19, 2023 · 9 min read · Terraform  ·
    Last Modified : Nov 2, 2026
    Share on: twitter facebook linkedin copy
    Terraform Use Module Output as Input for Another Module: Wiring, Type Errors and the for_each Trap (Terraform 1.17)

    TL;DR TL;DR Two steps: declare output "instance_id" inside module A, then pass module.ec2_module.instance_id as an argument of module B in the root module. Modules never talk to each other directly; the root module is the wire. That one reference is also the dependency: Terraform creates A first and B second. …


    Read More
  • Terraform Reference Module Output: module.name.output, Sensitive Outputs and Passing Values Between Modules (Terraform 1.17)

    calendar Jun 18, 2023 · 8 min read · Terraform  ·
    Last Modified : Nov 2, 2026
    Share on: twitter facebook linkedin copy
    Terraform Reference Module Output: module.name.output, Sensitive Outputs and Passing Values Between Modules (Terraform 1.17)

    TL;DR TL;DR Inside a module you cannot see resources of a sibling or parent module. The only way out is an output block in the child, read from the caller as module.<module_name>.<output_name>. A reference to a name the child never declared fails at validate time with Unsupported attribute; I show the exact …


    Read More
  • Terraform Variable Within Variable: Why It Fails and the Three Patterns That Work (Terraform 1.17)

    calendar May 4, 2023 · 9 min read · Terraform  ·
    Last Modified : Nov 3, 2026
    Share on: twitter facebook linkedin copy
    Terraform Variable Within Variable: Why It Fails and the Three Patterns That Work (Terraform 1.17)

    TL;DR TL;DR A Terraform variable cannot refer to another variable. default = "app-${var.env}" fails with Error: Variables not allowed ... Variables may not be used here. The same error appears for a reference inside terraform.tfvars. The fix is to compute the combined value in a locals block: full_name = …


    Read More
  • How to generate an SSH key in Terraform with tls_private_key and register it as an AWS key pair

    calendar Sep 19, 2022 · 10 min read · Terraform  ·
    Last Modified : Nov 1, 2026
    Share on: twitter facebook linkedin copy
    How to generate an SSH key in Terraform with tls_private_key and register it as an AWS key pair

    TL;DR TL;DR Three resources do the whole job: tls_private_key creates the key pair, aws_key_pair registers the public key with AWS, and local_sensitive_file writes the private key to disk with file_permission = "0600". AWS never receives the private key. aws_key_pair takes only public_key, so pass it …


    Read More
  • Terraform and AWS Credentials: Environment Variables, Shared Files and Profiles Compared (AWS Provider 6.71)

    calendar May 10, 2022 · 10 min read · Terraform AWS  ·
    Last Modified : Nov 4, 2026
    Share on: twitter facebook linkedin copy
    Terraform and AWS Credentials: Environment Variables, Shared Files and Profiles Compared (AWS Provider 6.71)

    TL;DR TL;DR The AWS provider reads credentials from six places, first match wins: provider block arguments, environment variables, the shared credentials file, the shared config file, container credentials, then the EC2 instance profile. I confirmed the first three with Terraform 1.17.1 and AWS provider 6.71.0 on …


    Read More
  • How Terraform Modules Work: Write a Module, Test It with terraform test, Version It and Rename It with moved Blocks (Terraform 1.17)

    calendar Aug 9, 2021 · 13 min read · Terraform  ·
    Last Modified : Oct 30, 2026
    Share on: twitter facebook linkedin copy
    How Terraform Modules Work: Write a Module, Test It with terraform test, Version It and Rename It with moved Blocks (Terraform 1.17)

    TL;DR TL;DR A Terraform module is any directory of .tf files; the directory you run terraform apply in is the root module, and every module block calls a child module from it. A module needs three files to be useful: main.tf, variables.tf and outputs.tf, which is the layout the Terraform docs recommend for a minimal …


    Read More
  • Terraform Error: Value for undeclared variable - A Variable Named Was Assigned on the Command Line (Terraform 1.17 Fix)

    calendar Apr 16, 2021 · 11 min read · Terraform Terraform Errors  ·
    Last Modified : Nov 1, 2026
    Share on: twitter facebook linkedin copy
    Terraform Error: Value for undeclared variable - A Variable Named Was Assigned on the Command Line (Terraform 1.17 Fix)

    TL;DR The error means one thing: you passed -var="name=value" and the root module has no variable "name" {} block. Terraform 1.17.1 prints Error: Value for undeclared variable and exits with code 1 before it plans anything. The fix is one of two lines: add the variable block to a .tf file in the …


    Read More
    • ««
    • «
    • 1
    • 2
    • »
    • »»

Categories

TERRAFORM 67 AWS 50 KUBERNETES 29 DOCKER 28 ANSIBLE 15 HELM CHART 12 DEVOPS 8 GOOGLE CLOUD 8 BLOGGING 6 SSL 6 GITHUB 5 SPRING BOOT 5 AZURE 4 QUARKUS 4
All Categories

AI1 ANSIBLE15 AWS50 AZURE4 BLOGGING6 DEVOPS8 DOCKER28 GITHUB5 GOOGLE CLOUD8 GRADLE1 HADOOP1 HELM CHART12 HIBERNATE1 JENKINS2 KUBERNETES29 KUBESPRAY3 LINUX COMMANDS1 NGINX2 PROMETHEUS-GRAFANA3 QUARKUS4 SPRING BOOT5 SSL6 TERRAFORM67 VAGRANT3
[A~Z][0~9]

Series

TERRAFORM 65 AWS 39 KUBERNETES 29 DOCKER 28 ANSIBLE 14 HELM CHART 12 GOOGLE CLOUD 8 AZURE 4 DEVOPS 4 JENKINS 2 AI 1 LINUX COMMANDS 1

Tags

KUBERNETES 21 HELM CHART 11 TERRAFORM 11 BLOGGING 4 QUARKUS 4 DOCKER 3 GITHUB 3 SSL 3 ANSIBLE 2 CAREER 2 KUBESPRAY 2 SPRING BOOT 2 ANSIBLE INSTALLATION 1 AWS 1
All Tags

ANSIBLE2 ANSIBLE INSTALLATION1 AWS1 AZURE1 BLOGGING4 CAREER2 DEVOPS1 DOCKER3 GIT1 GITHUB3 HADOOP1 HELM CHART11 INDEX1 KUBERNETES21 KUBESPRAY2 NGINX1 QUARKUS4 SECRETS1 SECURITY1 SPRING BOOT2 SSL3 TERRAFORM11 TERRAFORM ERRORS1
[A~Z][0~9]

Recent Posts

  • terraform console: Evaluate Expressions, Functions and cidrsubnet Without Applying Anything (Terraform 1.17)
  • Terraform tls_private_key: Generate SSH Keys and Self-Signed Certificates with the tls Provider (Terraform 1.17)
  • Stop Using .env Files for Secrets: Encrypt Them with sops and age Instead (Real Output, gitleaks Included)
  • Ansible on AWS: Zero-Downtime Deploys Behind an ALB, RDS, and an AI Postmortem (Project 2)
  • Kubernetes IP Address Planning: 22 Problems the Free IP Calculator Solves on EKS, GKE, AKS and On-Premises (kubeadm, Mirantis MKE, RKE2, OpenShift, Tanzu, Talos), with the Numbers and a Screenshot for Each
  • git rebase --exec Explained - Run Your Tests on Every Commit Before You Push, with Real Output, the Failure Path, and the Three Things That Bit Me
  • helm template Explained - Render a Helm Chart Locally Without a Cluster (Helm 4): Values Files, --set, --show-only, --output-dir, and the Traps That Bite
  • Should You Do a Cloud Certification? The Four Reasons I Tell People Not to Collect Them, What the Exams Cost in 2026, and the One Case Where a Certificate Is Worth the Money

Rahul Wagh

Jhooq
Its all about Open Source and DevOps, here I talk about Kubernetes, Docker, Java, Spring boot and practices.
Read More


Jhooq

Copyright 2019-  JHOOQ. All Rights Reserved

to-top
Privacy Policy