Blog

Latest Articles - Page 29

Browse the latest tutorials, guides, and practical examples across Linux, DevOps, security, databases, and programming on GoLinuxCloud.

Explore the latest tutorials and guides across Linux, DevOps, programming, and more.

You can also browse content by category below:

  • Linux: Commands, administration, troubleshooting, and system operations
  • DevOps: CI/CD, Kubernetes, containers, and automation
  • Cloud: AWS, Azure, OpenStack, and hybrid cloud administration
  • Programming: Coding tutorials, scripting, and development concepts
  • Security: Ethical hacking, system security, and best practices
  • Databases: MySQL, MariaDB, PostgreSQL, and database management
  • Networking: Network setup, troubleshooting, and protocols
  • Storage: Disk management, file systems, and storage solutions
  • Tools: Useful tools and utilities for productivity

3098 articles

Blog illustration with latest articles, tutorials, guides, and how-to content across Linux and DevOps topics
devops

Fix Terraform "Functions May Not Be Called Here" Error

Fix Terraform Functions may not be called here on Ubuntu — reproduce the error from timestamp in a variable default, move the calculation to locals, use functions in resource expressions, dynamic null-default fallback, …

Deepak Prasad10 min read
devops

Remove a Terraform Resource Without Destroying It

Stop managing Terraform resources without deleting real infrastructure on Ubuntu — why removing a block plans destroy, removed block with destroy false, terraform state rm, independent verification with cat and docker …

Deepak Prasad12 min read
devops

Terraform Module Outputs with count and for_each

Read Terraform module outputs when count or for_each creates multiple instances — single module references, indexed and splat syntax, conditional count with one, keyed for_each access, aggregating outputs with for …

Deepak Prasad13 min read
devops

Terraform templatefile with JSON and YAML

Generate JSON and YAML from Terraform without broken escaping — templatefile basics, passing template variables, jsonencode and yamlencode for nested structures, template loops when text formatting matters, heredoc …

Deepak Prasad13 min read
devops

Terraform try vs can Functions

Compare Terraform try and can on Ubuntu — missing attribute fallbacks, can validation guards, normalization locals for decoded YAML and JSON, errors try cannot catch, lookup and optional alternatives, and common masking …

Deepak Prasad15 min read
devops

Terraform flatten with Nested Maps and for_each

Flatten nested Terraform maps into for_each-ready keyed maps on Ubuntu — nested for expressions, flatten list of lists, stable composite keys, terraform_data instances, state addresses, key stability when input shrinks, …

Deepak Prasad11 min read
devops

Terraform Optional Object Attributes and Defaults

Use Terraform optional() inside object type constraints on Ubuntu — required vs optional attributes, default values, nested optional objects, omitted vs explicit null, map(object) inputs, tfvars overrides, and common …

Deepak Prasad15 min read
devops

Terraform "(known after apply)" Explained

Understand Terraform known after apply on Ubuntu — normal computed unknowns in plan output, when unknown values break count and for_each, static map keys with apply-time values, deferred data sources, module output …

Deepak Prasad10 min read
devops

Fix Terraform "Attempt to Get Attribute from Null Value"

Fix Terraform Attempt to get attribute from null value on Ubuntu — null parent object access, optional attributes versus entire object null, default empty object patterns, conditional and try guards, nested null parents, …

Deepak Prasad14 min read
devops

Fix Terraform "Saved Plan Is Stale" Error

Fix Terraform Saved plan is stale on Ubuntu — reproduce stale saved plan after state serial changes, distinguish lineage mismatch errors, regenerate plan -out before apply, CI race causes, locking and concurrency …

Deepak Prasad10 min read
devops

Fix Terraform Undeclared Variable Errors

Fix Terraform undeclared variable errors on Ubuntu — Reference to undeclared input variable versus Value for undeclared variable, missing variable blocks, extra terraform.tfvars keys, -var and -var-file mistakes, module …

Deepak Prasad10 min read
devops

Fix Terraform "Error: Cycle" Dependency Error

Fix Terraform Error Cycle on Ubuntu — mutual resource references, module dependency loops, unnecessary depends_on chains, terraform graph with draw-cycles, breaking cycles with locals and one-direction flow, and …

Deepak Prasad10 min read
devops

Fix Terraform "Provider Configuration Not Present" Error

Fix Terraform Provider configuration not present on Ubuntu — state bound to removed provider aliases, module providers map and configuration_aliases, safe restore-destroy-remove sequence, related missing-provider errors, …

Deepak Prasad11 min read
devops

Terraform CI/CD Pipeline with GitHub Actions

Build a Terraform CI/CD pipeline with GitHub Actions on Ubuntu — run terraform fmt check, validate and plan non-interactively with TF_IN_AUTOMATION and TF_INPUT, save and apply a reviewed plan file, protect concurrent …

Deepak Prasad40 min read
devops

Fix Terraform "Inconsistent Dependency Lock File" Error

Fix Terraform Inconsistent dependency lock file on Ubuntu — configuration versus .terraform.lock.hcl mismatch, no version is selected errors, init versus init -upgrade, saved plan and lock drift, CI artifact handling, …

Deepak Prasad11 min read
devops

Fix Terraform "Unsupported Attribute" Error

Fix Terraform Unsupported attribute on Ubuntu — wrong object keys, missing module outputs, count and for_each module shape changes, terraform_remote_state output typos, terraform console diagnostics with type and keys, …

Deepak Prasad12 min read
devops

Fix Terraform "Invalid Index" Error

Fix Terraform Invalid index on Ubuntu — missing map keys, list index out of range, empty tuple from conditional resources, count.index mismatches, for_each module addressing, terraform console diagnostics, and safer …

Deepak Prasad11 min read
devops

Fix Terraform "Invalid for_each Argument" Error

Fix Terraform Invalid for_each argument on Ubuntu — wrong list or tuple type, toset and map conversion, keys known only after apply, map of objects with each.key, nested list flattening, duplicate keys, and verification …

Deepak Prasad14 min read
devops

Terraform Test Framework with Examples

Learn the Terraform test framework on Ubuntu with terraform test — write .tftest.hcl files with run blocks and assert conditions, compare plan versus apply tests, pass test variables, mock providers without cloud …

Deepak Prasad16 min read
devops

terraform console Command with Examples

Learn the terraform console command on Ubuntu — evaluate expressions and functions interactively, inspect variables, locals and resource attributes from state, read unknown values with -plan, pipe expressions …

Deepak Prasad23 min read
devops

terraform graph: Visualize Terraform Dependencies

Generate and render Terraform dependency graphs on Ubuntu with terraform graph and Graphviz — read DOT output, pipe to SVG or PNG, compare implicit references with explicit depends_on, inspect module clusters, and use …

Deepak Prasad12 min read
devops

Migrate Local Terraform State to HCP Terraform

Move an existing locally managed Terraform state into an HCP Terraform workspace from Ubuntu — verify healthy local state, back it up, add a cloud block to an empty destination workspace, answer the migration prompt …

Deepak Prasad16 min read
devops

Terraform Troubleshooting Guide

Diagnose Terraform failures on Ubuntu by isolating the stage that broke — triage commands, terraform init and plan errors, partial apply recovery, provider and authentication failures, state lock and backend problems, …

Deepak Prasad24 min read
devops

Terraform Logging and Debugging with TF_LOG

Learn Terraform debug logs on Ubuntu — turn on TF_LOG, compare TRACE, DEBUG, INFO, WARN and ERROR volume, persist output with TF_LOG_PATH, split Terraform Core from provider logs with TF_LOG_CORE and TF_LOG_PROVIDER, …

Deepak Prasad24 min read
devops

Terraform Import: Import Existing Infrastructure

Learn Terraform import on Ubuntu — bring existing infrastructure under Terraform management with the terraform import CLI, declarative import blocks, generated configuration, for_each imports, module addresses, and plan …

Deepak Prasad26 min read
devops

Terraform Workspaces with Examples

Learn Terraform CLI workspaces on Ubuntu — workspace list, new, select, show, delete, terraform.workspace in configuration, local state layout, when to use workspaces, and how they differ from HCP Terraform workspaces on …

Deepak Prasad13 min read
devops

Terraform Drift Detection and Refresh-Only Mode

Learn Terraform drift detection on Ubuntu — out-of-band Docker changes, normal terraform plan, plan and apply -refresh-only, state vs configuration vs remote objects, deprecated terraform refresh, ignore_changes …

Deepak Prasad10 min read
devops

Terraform moved and removed Blocks with Examples

Learn Terraform moved and removed blocks on Ubuntu — rename resources, move into modules, stop managing without destroy, moved vs state mv, removed vs state rm, for_each address changes, and before-after plan evidence on …

Deepak Prasad10 min read
devops

Terraform State Commands with Examples

Learn terraform state commands on Ubuntu — state list, show, mv, rm, pull, and push with resource addresses, backup before modification, rm vs destroy, mv vs moved blocks, and push lineage warnings on Terraform 1.15.8.

Deepak Prasad11 min read
devops

Terraform State Locking and force-unlock

Learn Terraform state locking on Ubuntu — why backends lock state, reproduce Error acquiring the state lock, read lock ID metadata, safely use terraform force-unlock, lock-timeout and lock false risks, and current S3 …

Deepak Prasad11 min read