-
Notifications
You must be signed in to change notification settings - Fork 50
/
Copy pathsession-23.txt
52 lines (32 loc) · 1.01 KB
/
session-23.txt
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
expense
------------
1. create 3 instances
2. create 3 records
if db instance should be t3.small
if frontend daws78s.online --> public ip
otherwise db/backend.daws78s.online --> private ip
aws_instance.expense --> instance information
if frontend ? daws78s.online : db/backend.daws78s.online
interpolation
-----------------
variable "greeting" {
default = "morning"
}
"Hello {{greeting}}" --> interpolation
"Hello ${var.greeting}"
. --> variable/text
outputs
locals
locals and variables are same, referring key value pairs
locals can hold expressions and use it wherever you want. You can use variables inside locals. but you can't use other variables/locals inside variables
data sources
------------------
going to console, searching it and then using it...
querying and filtering AWS
terraform have AWS credentials..
terraform can query and fetch the AMI_ID automatically
few teams created infra manually. our team is using terraform
I want existing default vpc_id...
state and remote state
for loop
dynamic block