terraform output -raw instance_ip

Category: IaC & Automation

terraform output -raw instance_ip

Print one output value as a bare string

Prints only the raw value of the instance_ip output with no quoting or formatting, perfect for assigning to a shell variable. Works for outputs whose values convert to a string. Related: terraform output -json.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.