Skip to content

Instantly share code, notes, and snippets.

View huylv95's full-sized avatar

Huy Le huylv95

  • Ho Chi Minh
View GitHub Profile
@huylv95
huylv95 / index.js
Created May 19, 2021 09:51 — forked from jeroenvollenbrock/aws-cloudfront-basic-auth.js
AWS-CloudFront-basic-auth
var USERS = {
protecteddir: [{
username: 'user',
password: 'pass',
}],
};
//Response when auth is not valid.
var response401 = {
statusCode: 401,
@huylv95
huylv95 / terraform-map-variable.tf
Created October 25, 2022 14:52 — forked from devops-school/terraform-map-variable.tf
Terraform variable Map Type Explained
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"
}