-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathcomponents.tfcomponent.hcl
More file actions
52 lines (40 loc) · 1013 Bytes
/
Copy pathcomponents.tfcomponent.hcl
File metadata and controls
52 lines (40 loc) · 1013 Bytes
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
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
component "s3" {
for_each = var.regions
source = "./s3"
inputs = {
region = each.value
}
providers = {
aws = provider.aws.configurations[each.value]
random = provider.random.this
}
}
component "lambda" {
for_each = var.regions
source = "./lambda"
inputs = {
region = var.regions
bucket_id = component.s3[each.value].bucket_id
}
providers = {
aws = provider.aws.configurations[each.value]
archive = provider.archive.this
local = provider.local.this
random = provider.random.this
}
}
component "api_gateway" {
for_each = var.regions
source = "./api-gateway"
inputs = {
region = each.value
lambda_function_name = component.lambda[each.value].function_name
lambda_invoke_arn = component.lambda[each.value].invoke_arn
}
providers = {
aws = provider.aws.configurations[each.value]
random = provider.random.this
}
}