How to Deprecate Variables and Outputs in OpenTofu
Mark a module’s old variable and output as deprecated in OpenTofu, see the warnings in tofu plan, and move callers to the new names.
- DevOps
- OpenTofu
Mark a module’s old variable and output as deprecated in OpenTofu, see the warnings in tofu plan, and move callers to the new names.
terraform.tfvars and any .auto.tfvars file load automatically; other .tfvars files need -var-file. See all three in one real OpenTofu project.
Mark a variable and an output as sensitive in OpenTofu, see what plan and apply hide, and learn where the secret is still stored in plain text.
A variable with no default is required: see OpenTofu ask for its value, the error you get with -input=false, and how a tfvars file answers it.
Every OpenTofu variable type, from string to object, with a real example of each, how OpenTofu prints it and what happens when a value has the wrong type.
Declare an input variable in OpenTofu, use it in a resource with var., and change its value from a terraform.tfvars file.
Part 4 moves the Bookshop’s name, featured book and port into OpenTofu input variables, sets new values in terraform.tfvars and prints the address with outputs.