Skip to main content

Showing tag results for Expressions

Posts

0 comments 0 reactions

OpenTofu Logical Operators: &&, || and !

Jagdish Kumawat

Combine true and false values in OpenTofu with &&, || and !, and see how short-circuiting avoids an error on a null value.

  • DevOps
  • OpenTofu
0 comments 0 reactions

OpenTofu Equality Operators: == and !=

Jagdish Kumawat

Check whether two OpenTofu values are the same with == and !=, and see why the type has to match too.

  • DevOps
  • OpenTofu
0 comments 0 reactions

How to Use path.module in OpenTofu

Jagdish Kumawat

Build file paths from a module’s own folder with path.module, and see its value in the root module and in a child module.

  • DevOps
  • OpenTofu
0 comments 0 reactions

How to Use the file Function in OpenTofu

Jagdish Kumawat

Read a text file into an OpenTofu string with the file function, and see why the file has to exist before the run.

  • DevOps
  • OpenTofu
0 comments 0 reactions

How to Use the replace Function in OpenTofu

Jagdish Kumawat

Change every occurrence of some text in an OpenTofu string with replace, using plain text or a regular expression.

  • DevOps
  • OpenTofu
0 comments 0 reactions

How to Use the floor Function in OpenTofu

Jagdish Kumawat

Round a number down to a whole number with OpenTofu’s floor function, and use it to check that a value has no fraction.

  • DevOps
  • OpenTofu
0 comments 0 reactions

How to Use the cidrhost Function in OpenTofu

Jagdish Kumawat

Work out a host’s IP address in a network with OpenTofu’s cidrhost function, and see the error for a host number that doesn’t fit.

  • DevOps
  • OpenTofu