-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
65 lines (54 loc) · 1.31 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
62
63
64
65
#-----------------------
# Geocoding
#-----------------------
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 4.16"
}
}
required_version = ">= 1.2.0"
}
# -----------------------
# VARIABLES SECTION - PLEASE UPDATE TO MATCH YOUR ENVIRONMENT
variable "aws_region" {
description = "AWS region"
type = string
default = "us-east-1"
}
variable s3_precode_prefix {
description = "S3 prefix"
type = string
default = "pre_geocode"
}
variable s3_postcode_prefix {
description = "S3 prefix"
type = string
default = "post_geocode"
}
# END OF VARIABLES SECTION
# -----------------------
provider "aws" {
region = var.aws_region
}
module "location" {
source = "./modules/location"
}
module "lambdas" {
source = "./modules/lambdas"
sqs_queue_arn = module.sqs.sqs_queue_arn
sqs_queue_url = module.sqs.sqs_queue_url
index_name = module.location.index_name
s3_bucket_name = module.s3.s3_bucket_name
s3_postcode_prefix = var.s3_postcode_prefix
}
module "sqs" {
source = "./modules/sqs"
}
module "s3" {
source = "./modules/s3"
batcher_function_name = module.lambdas.batcher_function_name
batcher_function_arn = module.lambdas.batcher_function_arn
s3_precode_prefix = var.s3_precode_prefix
}