Skip to content

Commit 0b3a989

Browse files
committed
paths test
1 parent 5ddea7b commit 0b3a989

File tree

3 files changed

+20
-18
lines changed

3 files changed

+20
-18
lines changed

azure/templates/post-deploy.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ steps:
5656
echo Apigee environment: $APIGEE_ENVIRONMENT
5757
echo pr_no: $pr_no
5858
59+
cd lambdas
60+
ls
61+
cd id_sync
62+
ls
63+
cd ..
64+
cd ..
5965
cd terraform
6066
6167
make init

terraform/id_sync_lambda.tf

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
locals {
33
lambdas_dir = abspath("${path.root}/../lambdas")
44
shared_dir = "${local.lambdas_dir}/shared"
5-
id_sync_lambda_dir = "${local.lambdas_dir}/id_sync"
5+
id_sync_lambda_dir = abspath("${path.root}/../lambdas/id_sync")
66
id_sync_dockerfile = "${local.lambdas_dir}/id_sync.Dockerfile"
77

88
# Get files from both directories
@@ -13,18 +13,6 @@ locals {
1313
shared_dir_sha = sha1(join("", [for f in local.shared_files : filesha1("${local.shared_dir}/${f}")]))
1414
id_sync_lambda_dir_sha = sha1(join("", [for f in local.id_sync_lambda_files : filesha1("${local.id_sync_lambda_dir}/${f}")]))
1515

16-
# Combined SHA to trigger rebuild when either directory changes
17-
combined_sha = sha1("${local.shared_dir_sha}${local.id_sync_lambda_dir_sha}")
18-
repo_root = abspath("${path.root}/..")
19-
is_azure_devops = can(regex("^/agent/_work", path.root))
20-
21-
debug_paths = {
22-
terraform_root = path.root
23-
repo_root = local.repo_root
24-
lambdas_dir = local.lambdas_dir
25-
dockerfile_path = local.id_sync_dockerfile
26-
is_azure = local.is_azure_devops
27-
}
2816
}
2917

3018
resource "aws_ecr_repository" "id_sync_lambda_repository" {
@@ -37,11 +25,11 @@ resource "aws_ecr_repository" "id_sync_lambda_repository" {
3725

3826
# Module for building and pushing Docker image to ECR
3927
module "id_sync_docker_image" {
40-
source = "terraform-aws-modules/lambda/aws//modules/docker-build"
41-
version = "8.0.1"
42-
43-
create_ecr_repo = false
44-
ecr_repo = aws_ecr_repository.id_sync_lambda_repository.name
28+
source = "terraform-aws-modules/lambda/aws//modules/docker-build"
29+
version = "8.0.1"
30+
docker_file_path = "Dockerfile"
31+
create_ecr_repo = false
32+
ecr_repo = aws_ecr_repository.id_sync_lambda_repository.name
4533
ecr_repo_lifecycle_policy = jsonencode({
4634
"rules" : [
4735
{

terraform/outputs.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,11 @@ output "aws_sqs_queue_name" {
1717
output "aws_sns_topic_name" {
1818
value = aws_sns_topic.delta_sns.name
1919
}
20+
21+
output "lambdas_dir_abs_path" {
22+
value = local.id_sync_lambda_dir
23+
}
24+
25+
output "lambdas_dir_normal" {
26+
value = "${local.id_sync_lambda_dir}/id_sync"
27+
}

0 commit comments

Comments
 (0)