Terraform
Terraform Output
Appears inTerraform Associate
A value exported after a terraform apply. Lets you expose resource attributes (IPs, URLs, IDs) for use in other modules or to display to the user. Declared with output {} in outputs.tf.
On the exam
In Terraform Associate: outputs are the way to pass values between modules (module.name.output_name). They're also useful for post-deployment scripts that need values like the IP of a newly created VM.
Related terms
- Terraform VariableAn input parameter that lets you parameterize Terraform configurations. Declared with variable {} and assigned via a .tfvars file, environment variables (TF_VAR_), -var flags, or interactively.
- Terraform ModuleA reusable set of Terraform resources grouped in a directory. The root module is the main working directory. Child modules are called from the root and can come from local sources, the Terraform Registry, or Git repositories.