Skip to content

Commit e0d539f

Browse files
committed
flatten the infra structure
1 parent 5cdeb48 commit e0d539f

39 files changed

Lines changed: 167 additions & 173 deletions

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
node_modules/
1+
**/node_modules/
22
.DS_Store
3-
infra/tf/.terraform/
3+
**/.terraform/
44
.env

Makefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
.PHONY: *
2-
31
clean:
42
rm -rf ./infra/bigquery-export/node_modules
53
rm -rf ./infra/dataform-service/node_modules
64

75
tf_plan:
8-
terraform -chdir=infra/tf init -upgrade && terraform -chdir=infra/tf plan
6+
cd infra && terraform init -upgrade && terraform plan
97

108
tf_apply:
11-
terraform -chdir=infra/tf init && terraform -chdir=infra/tf apply -auto-approve
9+
cd infra && terraform init && terraform apply -auto-approve
File renamed without changes.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ data "external" "source_hash" {
1515
program = [
1616
"bash",
1717
"-c",
18-
"cd ../${var.function_name}/ && echo '{\"hash\":\"'$(git ls-files -s | sha1sum | cut -c1-8)'\"}'"
18+
"cd ./${var.function_name}/src/ && echo '{\"hash\":\"'$(git ls-files -s | sha1sum | cut -c1-8)'\"}'"
1919
]
2020
}
2121

@@ -25,7 +25,7 @@ resource "docker_image" "function_image" {
2525
name = "${var.region}-docker.pkg.dev/${var.project}/dataform/${var.function_name}:${data.external.source_hash.result.hash}"
2626

2727
build {
28-
context = "../${var.function_name}/"
28+
context = "./${var.function_name}/src/"
2929
platform = "linux/amd64"
3030
}
3131
}

0 commit comments

Comments
 (0)