-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
37 lines (35 loc) · 980 Bytes
/
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
37
terraform {
required_providers {
awsapigateway = {
source = "Traceableai/awsapigateway"
version = "0.3.0"
}
}
}
# For a list of accounts
resource "awsapigateway_resource" "traceable-example-1" {
identifier = uuid()
ignore_access_log_settings = false
dynamic "accounts" {
for_each = var.accounts
content {
region = accounts.value["region"]
api_list = accounts.value["api_list"]
cross_account_role_arn = accounts.value["cross_account_role_arn"]
exclude = accounts.value["exclude"]
}
}
timeout = "10s"
}
# For a single account
resource "awsapigateway_resource" "traceable-example-2" {
identifier = uuid()
ignore_access_log_settings = false
accounts {
region = "us-east-1"
api_list = ["api1", "api2"]
cross_account_role_arn = ""
exclude = false
}
timeout = "1s"
}