-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
61 lines (52 loc) · 1.33 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 4"
}
local = {
source = "hashicorp/local"
version = "2.1.0"
}
}
}
locals {
secrets_arn = var.create_secret ? one(aws_secretsmanager_secret.tdbot[*].arn) : var.secret_arn
name_prefix = var.name_prefix == "" ? "" : "${var.name_prefix}-"
}
variable "name_prefix" {
description = "name prefix for resources"
type = string
default = ""
}
variable "weights" {
description = "securities weights, key = security name, value = weight"
type = map(number)
default = {}
}
variable "fargate_arn" {
description = "Fargate cluster ARN"
type = string
}
variable "account_id" {
description = "TD Ameritrade account ID"
type = string
}
variable "subnets" {
description = "subnets to launch the task into"
type = list(string)
}
variable "security_groups" {
description = "security groups to assign to task"
type = list(string)
}
variable "secret_arn" {
description = "secrets manager arn to use instead of creating a new one (if used, set var.create_secret to false)"
type = string
default = ""
}
variable "create_secret" {
description = "create the secret (should be false if you provide a secret_arn)"
type = bool
default = true
}