-
Notifications
You must be signed in to change notification settings - Fork 2
/
ec2.tf
77 lines (55 loc) · 3.06 KB
/
ec2.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
module "primary" {
source = "./modules/vault-region"
name_prefix = var.name_prefix
vpc_id = var.vpc_id
asg = local.asg
nlbs = local.nlbs
dynamodb_table_name = var.existing_dynamodb_tables == {} ? aws_dynamodb_table.dynamodb_table[0].id : var.existing_dynamodb_tables.primary.name
iam_instance_profile_arn = aws_iam_instance_profile.vault.arn
vault_kms_seal_key_id = var.existing_kms_seal_key_id == "" ? aws_kms_key.seal[0].key_id : data.aws_kms_key.existing_kms_seal_key_id[0].id
ami_owners = var.ami_owners
ami_name_regex = var.ami_name_regex
vault_version = var.vault_version
vault_cert_dir = var.vault_cert_dir
vault_config_dir = var.vault_config_dir
vault_additional_config = var.vault_additional_config
vault_additional_userdata = var.vault_additional_userdata
vault_dns_domain = var.vault_dns_domain
vault_api_address = var.vault_api_address
vault_routing_policy = var.vault_routing_policy
vault_tls_require_and_verify_client_cert = var.vault_tls_require_and_verify_client_cert
vault_max_lease_ttl = var.vault_max_lease_ttl
vault_default_lease_ttl = var.vault_default_lease_ttl
vault_prometheus_retention_time = var.vault_prometheus_retention_time
vault_tls_min_version = var.vault_tls_min_version
tags = var.tags
}
module "secondary" {
providers = {
aws = aws.secondary
}
source = "./modules/vault-region"
name_prefix = var.name_prefix
vpc_id = var.vpc_secondary_id
asg = local.asg_secondary
nlbs = local.nlbs_secondary
dynamodb_table_name = var.existing_dynamodb_tables == {} ? aws_dynamodb_table.dynamodb_table[0].id : var.existing_dynamodb_tables.secondary.name
iam_instance_profile_arn = aws_iam_instance_profile.vault.arn
vault_kms_seal_key_id = var.existing_kms_seal_key_id == "" ? aws_kms_key.seal[0].key_id : data.aws_kms_key.existing_kms_seal_key_id[0].id
ami_owners = var.ami_owners
ami_name_regex = var.ami_name_regex
vault_version = var.vault_version
vault_cert_dir = var.vault_cert_dir
vault_config_dir = var.vault_config_dir
vault_additional_config = var.vault_additional_config
vault_additional_userdata = var.vault_additional_userdata
vault_dns_domain = var.vault_dns_domain
vault_api_address = var.vault_api_address
vault_routing_policy = var.vault_routing_policy
vault_tls_require_and_verify_client_cert = var.vault_tls_require_and_verify_client_cert
vault_max_lease_ttl = var.vault_max_lease_ttl
vault_default_lease_ttl = var.vault_default_lease_ttl
vault_prometheus_retention_time = var.vault_prometheus_retention_time
vault_tls_min_version = var.vault_tls_min_version
tags = var.tags
}