This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var USERS = { | |
protecteddir: [{ | |
username: 'user', | |
password: 'pass', | |
}], | |
}; | |
//Response when auth is not valid. | |
var response401 = { | |
statusCode: 401, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Example 1 | |
=============================== | |
Maps are a way to create variables that are lookup tables. An example will show this best. Let's extract our AMIs into a map and add support for the us-west-2 region as well: | |
variable "amis" { | |
type = "map" | |
default = { | |
"us-east-1" = "ami-b374d5a5" | |
"us-west-2" = "ami-4b32be2b" | |
} |