-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest.tf
70 lines (55 loc) · 1.64 KB
/
test.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
module "vpc" {
source = "./vpc"
vpc_name = "terraform-modules-test"
num_availability_zones = 2
}
module "beanstalk_app_test" {
source = "./beanstalk_app"
app_name = "terraform-modules"
}
module "postgresdb_test" {
source = "./postgresdb"
namespace = "terraform-modules-test"
db_name = "terraform_modules"
db_password = "database-secret"
db_username = "db_test_user"
deletion_protection = false
skip_final_snapshot = true
}
module "beanstalk_worker" {
source = "./beanstalk_worker_env"
app_instance = "test"
app_name = "terraform-modules"
name = "terraform-modules-worker"
security_groups = [module.postgresdb_test.security_group_name]
environment_variables = {
DATABASE_URL = module.postgresdb_test.database_url
}
}
module "beanstalk_web" {
source = "./beanstalk_web_env"
name = "terraform-modules-web"
app_instance = "test"
app_name = "terraform-modules"
dns_zone = "aws.openoakland.org"
security_groups = [module.postgresdb_test.security_group_name]
environment_variables = {
DATABASE_URL = module.postgresdb_test.database_url
}
}
module "s3_cloudfront_website_test" {
source = "./s3_cloudfront_website"
host = "oo-s3-cf-website-terraform-modules-test"
providers = {
aws.main = aws
aws.cloudfront = aws.cloudfront
}
}
module "s3_deploy_user" {
source = "./s3_deploy_user"
username = "ci-terraform-modules-test"
s3_bucket_arn = module.s3_cloudfront_website_test.s3_bucket_arn
}
output "beanstalk_env_fqdn" {
value = module.beanstalk_web.fqdn
}