-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
36 lines (33 loc) · 1.07 KB
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
######################################################################
# Copyright (c) 2021 Claudio André <claudioandre.br at gmail.com>
#
# This program comes with ABSOLUTELY NO WARRANTY; express or implied.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, as expressed in version 2, seen at
# http://www.gnu.org/licenses/gpl-2.0.html
######################################################################
provider "aws" {
region = local.region
profile = local.profile
}
# Create workspaces to run the same set of instruction on different environments
locals {
profile = lookup(var.profile_list, terraform.workspace)
}
locals {
region = lookup(var.regions_list, terraform.workspace)
}
locals {
run_env = lookup(var.environment_list, terraform.workspace)
}
# Save terraform state remotely (if needed).
/* terraform {
backend "s3" {
bucket = "MyApp-tfstate"
key = "sg/terraform.state"
region = var.region
profile = var.profile
}
} */