Do you want BuboFlash to help you learning these things? Or do you want to add or correct something? Click here to log in or create user.



Question

In terraform, say you declared input variable "region", using following block in your *.tf config file:

variable "region" {
   default = "us-west-2" 
}

how do you access the value of this variable in the following *.tf code block:
provider "aws" {
access_key = "AKIA98298ADFDDRDSFDFSF"
secret_key = "_adofijoeairjdsfDDF(*Fjij"
region = [...]
}

Answer

"${var.region}"

^^ Note the use of the var syntax
^^^ note the outer enclosure in double quotes to mean derived value is string
^^^^note the inner enclosure in ${} to mean that this value is derived.


Question

In terraform, say you declared input variable "region", using following block in your *.tf config file:

variable "region" {
   default = "us-west-2" 
}

how do you access the value of this variable in the following *.tf code block:
provider "aws" {
access_key = "AKIA98298ADFDDRDSFDFSF"
secret_key = "_adofijoeairjdsfDDF(*Fjij"
region = [...]
}

Answer
?

Question

In terraform, say you declared input variable "region", using following block in your *.tf config file:

variable "region" {
   default = "us-west-2" 
}

how do you access the value of this variable in the following *.tf code block:
provider "aws" {
access_key = "AKIA98298ADFDDRDSFDFSF"
secret_key = "_adofijoeairjdsfDDF(*Fjij"
region = [...]
}

Answer

"${var.region}"

^^ Note the use of the var syntax
^^^ note the outer enclosure in double quotes to mean derived value is string
^^^^note the inner enclosure in ${} to mean that this value is derived.


Summary

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Details

No repetitions


Discussion

Do you want to join discussion? Click here to log in or create user.