Commit bc87dda 1 parent bc2ddde commit bc87dda Copy full SHA for bc87dda
File tree 7 files changed +33
-41
lines changed
7 files changed +33
-41
lines changed Original file line number Diff line number Diff line change @@ -4,40 +4,15 @@ ENV = dev
4
4
test :
5
5
pytest -s .
6
6
7
- .PHONY : invoke_lambda
8
- invoke_lambda :
7
+ .PHONY : invoke
8
+ invoke :
9
9
aws lambda invoke --function-name ${ENV} -youtube-comment-sentiment-analysis --cli-binary-format raw-in-base64-out --payload file://events/event.json output.json && cat output.json
10
10
11
11
.ONESHELL :
12
- .PHONY : build-lambda
13
- build-lambda :
14
- cd function
12
+ .PHONY : build
13
+ build :
15
14
mkdir -p .build
16
15
cp -r src/* .build/
17
16
uv pip compile pyproject.toml -o .build/requirements.txt
18
17
uv pip install -r .build/requirements.txt --target .build --python-platform x86_64-manylinux_2_40 --only-binary=:all:
19
- cd .build && rm -rf * .dist-info * .egg-info __pycache__
20
-
21
- .PHONY : terraform-init
22
- terraform-init :
23
- terraform -chdir=terraform init
24
-
25
- .PHONY : validate
26
- terraform-validate :
27
- terraform -chdir=terraform validate
28
-
29
- .PHONY : terraform-plan
30
- terraform-plan :
31
- terraform -chdir=terraform plan
32
-
33
- .PHONY : terraform-apply
34
- terraform-apply :
35
- terraform -chdir=terraform apply -auto-approve
36
-
37
- .PHONY : terraform-destroy
38
- terraform-destroy :
39
- terraform -chdir=terraform destroy
40
-
41
- .PHONY : terraform-workspace
42
- workspace :
43
- terraform -chdir=terraform workspace select -or-create ${ENV}
18
+ cd .build && rm -rf * .dist-info * .egg-info __pycache__
Original file line number Diff line number Diff line change 5
5
"path" : "."
6
6
} ,
7
7
{
8
- "name" : "⭐️ Lambda Code " ,
9
- "path" : "lambda_code "
8
+ "name" : "🚀 Continuous Deployment " ,
9
+ "path" : ".github/workflows "
10
10
} ,
11
11
{
12
- "name" : "🚀 Terraform " ,
12
+ "name" : "🏠 Infrastructure " ,
13
13
"path" : "terraform"
14
+ } ,
15
+ {
16
+ "name" : "⭐️ Lambda Code" ,
17
+ "path" : "lambda_code"
14
18
}
15
19
] ,
16
20
}
Original file line number Diff line number Diff line change @@ -14,13 +14,12 @@ module "lambda" {
14
14
module "s3" {
15
15
source = " ./modules/s3"
16
16
bucket_name = " ${ local . env } -youtube-comment-storage"
17
- env = local. env
18
17
service_name = var. service_name
18
+ env = local. env
19
19
}
20
20
21
21
module "glue" {
22
22
source = " ./modules/glue"
23
- env = local. env
24
23
database_name = " ${ local . env } _youtube_comment_db"
25
24
table_name = " ${ local . env } _youtube_comment_analytics"
26
25
bucket_name = module. s3 . bucket_name
Original file line number Diff line number Diff line change @@ -2,6 +2,14 @@ output "database_name" {
2
2
value = aws_glue_catalog_database. database . name
3
3
}
4
4
5
+ output "database_arn" {
6
+ value = aws_glue_catalog_database. database . arn
7
+ }
8
+
5
9
output "table_name" {
6
10
value = aws_glue_catalog_table. table . name
7
11
}
12
+
13
+ output "table_arn" {
14
+ value = aws_glue_catalog_table. table . arn
15
+ }
Original file line number Diff line number Diff line change 1
- variable "env" {
2
- type = string
3
- }
4
-
5
1
variable "bucket_name" {
6
2
type = string
7
3
}
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ variable "state_machine_name" {
2
2
type = string
3
3
}
4
4
5
- variable "lambda_arn " {
5
+ variable "state_machine_arn " {
6
6
type = string
7
- }
8
7
8
+ }
Original file line number Diff line number Diff line change @@ -23,7 +23,17 @@ output "glue_database_name" {
23
23
value = module. glue . database_name
24
24
}
25
25
26
+ output "glue_database_arn" {
27
+ description = " ARN of the Glue database"
28
+ value = module. glue . database_arn
29
+ }
30
+
26
31
output "glue_table_name" {
27
32
description = " Name of the Glue table"
28
33
value = module. glue . table_name
29
34
}
35
+
36
+ output "glue_table_arn" {
37
+ description = " ARN of the Glue table"
38
+ value = module. glue . table_arn
39
+ }
You can’t perform that action at this time.
0 commit comments