Contents Menu Expand Light mode Dark mode Auto light/dark mode
🙏🙏🙏 如果大家发现文章中的错误,欢迎提PR或者issue指正 文档源码地址.
Learn Terraform from Scratch
Learn Terraform from Scratch
  • What is Infrastructure as Code?
  • Quick Start
  • Variables and Outputs
    • Variables
    • Locals
    • Output
  • AWS Command Line Interface
  • Deploy Web Server
  • Functions and Looping
    • Count
    • for_each
    • Functions
    • Expressions
    • alias: Multiple Provider Configurations
  • Providers
  • Module
  • Managing State
    • State Command
    • Remote State S3
    • Consul
    • Re-creation of Resources
    • import
  • Data sources
  • Collaboration
  • CI/CD
  • Terraform Cloud
  • Troubleshooting
  • About the Exam
  • Azure with Terraform
  • About Me
Back to top
Edit this page

Variables and Outputs#

  • input variables

  • local values

  • output values

If you’re familiar with traditional programming languages, it can be useful to compare Terraform modules to function definitions:

Input variables are like function arguments. Output values are like function return values. Local values are like a function’s temporary local variables.

Contents:

  • Variables
    • Variable Syntax
    • Data Types
    • Supply variable values
    • Demo
  • Locals
    • Syntax
    • How to Use locals
  • Output
    • Syntax
    • Demo
    • sensitive
Next
Variables
Previous
Quick Start
Copyright © 2022, Peng Xiao. All rights reserved.
Made with Sphinx and @pradyunsg's Furo