Hitesh Sahu
Hitesh SahuHitesh Sahu
  1. Home
  2. β€Ί
  3. posts
  4. β€Ί
  5. …

  6. β€Ί
  7. CLI

Loading ⏳
Fetching content, this won’t take long…


πŸ’‘ Did you know?

πŸ¦₯ Sloths can hold their breath longer than dolphins 🐬.

πŸͺ This website uses cookies

No personal data is stored on our servers however third party tools Google Analytics cookies to measure traffic and improve your website experience. Learn more

Loading ⏳
Fetching content, this won’t take long…


πŸ’‘ Did you know?

πŸ¦₯ Sloths can hold their breath longer than dolphins 🐬.
Terraform

    AI-AgenticAI

    AI-DeepLearning

    AI-GenAI

    AI-Infrastructure

    AI-Machine-Learning

    AI-Math

    AWS

    Azure

    Hobbies

    kubernetes

    Management

    Programming

    Terraform
    • Terraform Certification Path

    • Terraform Basics

    • Terraform Configuration Management

    • TF Modules: How to Use & Create

    • TF State & Backend Management

    • Terraform Core Workflow & Commands

    • IaC Concepts & TF Overview

    • TF Cloud Capabilities & Workflow

    • TF CMD Cheatsheet

    • Terraform Index


    Z_Appendix

    0-root

Cover Image for TF CMD Cheatsheet
Terraform

TF CMD Cheatsheet

Quick reference for commonly used TF string functions. Learn how to manipulate strings efficiently in your Terraform configurations with this handy cheatsheet.

Terraform
Cloud
Infrastructure as Code
IaC
DevOps
← Previous

Terraform Certification Path

Next β†’

Kubernetes: Control Loops, Scheduling, and GPUs

πŸ“ TF CMD Cheatsheet: String Functions

func output usage
startswith("hello world", "hello") true
endswith("hello world", "world") true
upper("hello") HELLO
lower("HELLO") hello
strrev("hello") olleh
substr("hello world", 1, 4) ello
title("hello world") Hello World
trim("?!hello?!", "!?") hello Removes the specified set of characters from the start and end of the given string.
trimsuffix("helloworld", "world") hello removes the specified suffix from the end of the given string.
trimprefix("helloworld", "hello") world removes the specified prefix from the start of the given string.
trimspace(" hello\n\n") hello removes any space characters from the start and end of the given string.
indent(2, "[\n foo,\n bar,\n]\n") "[\n foo,\n bar,\n ]\n" adds a given number of spaces to the beginnings of all but the first line in a given multi-line string.
join("-", ["foo", "bar", "baz"]) "foo-bar-baz" produces a string by concatenating all of the elements of the specified list of strings with the specified separator.
replace("1 + 2 + 3", "+", "-") 1 - 2 - 3 searches a given string for another given substring, and replaces each occurrence with a given replacement string.
split(",", "foo,bar,baz") ["foo","bar","baz",] produces a list by dividing a given string at all occurrences of a given separator.
Hitesh Sahu
Written by Hitesh Sahu, a passionate developer and blogger.

Fri Feb 20 2026

Share This on

← Previous

Terraform Certification Path

Next β†’

Kubernetes: Control Loops, Scheduling, and GPUs

Terraform/CLI
Let's work together
+49 176-2019-2523
hiteshkrsahu@gmail.com
WhatsApp
Skype
Munich πŸ₯¨, Germany πŸ‡©πŸ‡ͺ, EU
Playstore
Hitesh Sahu's apps on Google Play Store
Need Help?
Let's Connect
Navigation
Β  Home/About
Β  Skills
Β  Work/Projects
Β  Lab/Experiments
Β  Contribution
Β  Awards
Β  Art/Sketches
Β  Thoughts
Β  Contact
Links
Β  Sitemap
Β  Legal Notice
Β  Privacy Policy

Made with

NextJS logo

NextJS by

hitesh Sahu

| Β© 2026 All rights reserved.