terraform variables: variables.tf

From wikieduonline
Revision as of 17:47, 19 October 2021 by Welcome (talk | contribs) (→‎Example)
Jump to navigation Jump to search

Example

Definition in variables.tf

variable "YourVarName" { default = "your_default_value" }

variable "YourVarName" {}
variable "YourVarName" {
  default = "your_default_value"
}
variable "YourVarName" {
  type = string
  description = "Description of your variable"
  default = "your_default_value"
}
 variable "YourVarName" {}

Usage in main.tf AnyFieldToAssingAValue = var.YourVarName

Errors

Related term

See also

Advertising: