-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata.tf
26 lines (23 loc) · 762 Bytes
/
data.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
######################################
# ------------ REST API ------------ #
######################################
data "aws_api_gateway_rest_api" "this" {
for_each = !var.api_gtw.create_api ? toset([local.gateway_name]) : toset([])
name = each.value
}
####################################
# ------------ Lambda ------------ #
####################################
# Recover Lambda ARN for Lambda integration
data "aws_lambda_function" "this" {
for_each = toset(local.lambdas_name)
function_name = each.value
}
#################################
# ------------ SNS ------------ #
#################################
# Recover Topic ARN for SNS integration
data "aws_sns_topic" "this" {
for_each = toset(local.sns_names)
name = each.value
}