From af0de7e8ff2efa1bce78af5223b82f3deacafb52 Mon Sep 17 00:00:00 2001 From: Jordan Acosta Date: Tue, 6 Aug 2024 13:14:01 -0700 Subject: [PATCH 1/2] fix(aws-lambda-tutorial): pin modules versions --- .../api-gateway/.terraform.lock.hcl | 34 +++++++++---------- .../components/api-gateway/main.tf | 3 +- .../dynamodb-table/.terraform.lock.hcl | 34 +++++++++---------- .../components/dynamodb-table/main.tf | 3 +- .../lambda-function/.terraform.lock.hcl | 32 ++++++++--------- .../components/lambda-function/main.tf | 3 +- 6 files changed, 56 insertions(+), 53 deletions(-) diff --git a/aws-lambda-tutorial/components/api-gateway/.terraform.lock.hcl b/aws-lambda-tutorial/components/api-gateway/.terraform.lock.hcl index a2ba206..1544252 100644 --- a/aws-lambda-tutorial/components/api-gateway/.terraform.lock.hcl +++ b/aws-lambda-tutorial/components/api-gateway/.terraform.lock.hcl @@ -2,24 +2,24 @@ # Manual edits may be lost in future updates. provider "registry.terraform.io/hashicorp/aws" { - version = "5.41.0" - constraints = ">= 4.0.0" + version = "5.61.0" + constraints = ">= 4.0.0, >= 4.40.0, >= 5.37.0" hashes = [ - "h1:DiX7N35G2NUQRyRGy90+gyePnhP4w77f8LrJUronotE=", - "zh:0553331a6287c146353b6daf6f71987d8c000f407b5e29d6e004ea88faec2e67", - "zh:1a11118984bb2950e8ee7ef17b0f91fc9eb4a42c8e7a9cafd7eb4aca771d06e4", - "zh:236fedd266d152a8233a7fe27ffdd99ca27d9e66a9618a988a4c3da1ac24a33f", - "zh:34bc482ea04cf30d4d216afa55eecf66854e1acf93892cb28a6b5af91d43c9b7", - "zh:39d7eb15832fe339bf46e3bab9852280762a1817bf1afc459eecd430e20e3ad5", - "zh:39fb07429c51556b05170ec2b6bd55e2487adfe1606761eaf1f2a43c4bb20e47", - "zh:71d7cd3013e2f3fa0f65194af29ee6f5fa905e0df2b72b723761dc953f4512ea", + "h1:qYXhPfMOxgOYuSjfe7+P2wdqx4oMkPYgH4XUN3fJb54=", + "zh:1a0a150b6adaeacc8f56763182e76c6219ac67de1217b269d24b770067b7bab0", + "zh:1d9c3a8ac3934a147569254d6e2e6ea5293974d0595c02c9e1aa31499a8f0042", + "zh:1f4d1d5e2e02fd5cccafa28dade8735a3059ed1ca3284fb40116cdb67d0e7ee4", + "zh:26be6f759bded469de477f54c7eb7a9ca9f137a3b52f9fd26cbd864f16973912", + "zh:276e308ae7aa281fe24f7275673aa05f00cb830b83c2b9797f9aa55f10769c52", + "zh:45c09beeadb4269d518de0bd341cbe9f061157ab54c543d39168ecefff40bbe2", + "zh:58fb5ef076dc63e284ce28b47b7cc35a17d2596f11e2373fe568c6140277e9d8", + "zh:64d51cc1ad412379f64b75883a881a5d682a8e9737ad14479f6a2d62e77f7dbe", + "zh:71e2e332317cf095288d65a801e95b65fd696204997b2db5250862d6c5669518", + "zh:9864014aa4716b5bfb3b27d009f158dd6a67c215fd0dfbe3a5d1a7cee72c5677", "zh:9b12af85486a96aedd8d7984b0ff811a4b42e3d88dad1a3fb4c0b580d04fa425", - "zh:9b271ae12394e7e2ce6da568b42226a146e90fd705e02a670fcb93618c4aa19f", - "zh:a884dd978859d001709681f9513ba0fbb0753d1d459a7f3434ecc5f1b8699c49", - "zh:b8c3c7dc10ae4f6143168042dcf8dee63527b103cc37abc238ea06150af38b6e", - "zh:ba94ffe0893ad60c0b70c402e163b4df2cf417e93474a9cc1a37535bba18f22d", - "zh:d5ba851d971ff8d796afd9a100acf55eaac0c197c6ab779787797ce66f419f0e", - "zh:e8c090d0c4f730c4a610dc4f0c22b177a0376d6f78679fc3f1d557b469e656f4", - "zh:ed7623acde26834672969dcb5befdb62900d9f216d32e7478a095d2b040a0ea7", + "zh:d8bf9ba43bd938faab37d8fb515c32a905d6dace60f5ff2663b06ffdc89a62e9", + "zh:e654be9d3980e7cc70f9825fe0d0205e254edd87832f18b2d7f9c72b09b776cd", + "zh:ee5ce6fbe75be3e90cabba3fad76fcfde50ab795e523b4ee917cfe8ba8ad42fe", + "zh:ef12098e7b3ddf9ab286bb209de87dfa8e52106049ced0841e3e6487dbff3659", ] } diff --git a/aws-lambda-tutorial/components/api-gateway/main.tf b/aws-lambda-tutorial/components/api-gateway/main.tf index 7cbe8cc..8af8ddf 100644 --- a/aws-lambda-tutorial/components/api-gateway/main.tf +++ b/aws-lambda-tutorial/components/api-gateway/main.tf @@ -15,7 +15,8 @@ locals { } module "api_gateway" { - source = "terraform-aws-modules/apigateway-v2/aws" + source = "terraform-aws-modules/apigateway-v2/aws" + version = "~> 5.1.0" name = var.name integrations = local.integrations diff --git a/aws-lambda-tutorial/components/dynamodb-table/.terraform.lock.hcl b/aws-lambda-tutorial/components/dynamodb-table/.terraform.lock.hcl index a2ba206..93afda3 100644 --- a/aws-lambda-tutorial/components/dynamodb-table/.terraform.lock.hcl +++ b/aws-lambda-tutorial/components/dynamodb-table/.terraform.lock.hcl @@ -2,24 +2,24 @@ # Manual edits may be lost in future updates. provider "registry.terraform.io/hashicorp/aws" { - version = "5.41.0" - constraints = ">= 4.0.0" + version = "5.61.0" + constraints = ">= 4.0.0, >= 5.21.0" hashes = [ - "h1:DiX7N35G2NUQRyRGy90+gyePnhP4w77f8LrJUronotE=", - "zh:0553331a6287c146353b6daf6f71987d8c000f407b5e29d6e004ea88faec2e67", - "zh:1a11118984bb2950e8ee7ef17b0f91fc9eb4a42c8e7a9cafd7eb4aca771d06e4", - "zh:236fedd266d152a8233a7fe27ffdd99ca27d9e66a9618a988a4c3da1ac24a33f", - "zh:34bc482ea04cf30d4d216afa55eecf66854e1acf93892cb28a6b5af91d43c9b7", - "zh:39d7eb15832fe339bf46e3bab9852280762a1817bf1afc459eecd430e20e3ad5", - "zh:39fb07429c51556b05170ec2b6bd55e2487adfe1606761eaf1f2a43c4bb20e47", - "zh:71d7cd3013e2f3fa0f65194af29ee6f5fa905e0df2b72b723761dc953f4512ea", + "h1:qYXhPfMOxgOYuSjfe7+P2wdqx4oMkPYgH4XUN3fJb54=", + "zh:1a0a150b6adaeacc8f56763182e76c6219ac67de1217b269d24b770067b7bab0", + "zh:1d9c3a8ac3934a147569254d6e2e6ea5293974d0595c02c9e1aa31499a8f0042", + "zh:1f4d1d5e2e02fd5cccafa28dade8735a3059ed1ca3284fb40116cdb67d0e7ee4", + "zh:26be6f759bded469de477f54c7eb7a9ca9f137a3b52f9fd26cbd864f16973912", + "zh:276e308ae7aa281fe24f7275673aa05f00cb830b83c2b9797f9aa55f10769c52", + "zh:45c09beeadb4269d518de0bd341cbe9f061157ab54c543d39168ecefff40bbe2", + "zh:58fb5ef076dc63e284ce28b47b7cc35a17d2596f11e2373fe568c6140277e9d8", + "zh:64d51cc1ad412379f64b75883a881a5d682a8e9737ad14479f6a2d62e77f7dbe", + "zh:71e2e332317cf095288d65a801e95b65fd696204997b2db5250862d6c5669518", + "zh:9864014aa4716b5bfb3b27d009f158dd6a67c215fd0dfbe3a5d1a7cee72c5677", "zh:9b12af85486a96aedd8d7984b0ff811a4b42e3d88dad1a3fb4c0b580d04fa425", - "zh:9b271ae12394e7e2ce6da568b42226a146e90fd705e02a670fcb93618c4aa19f", - "zh:a884dd978859d001709681f9513ba0fbb0753d1d459a7f3434ecc5f1b8699c49", - "zh:b8c3c7dc10ae4f6143168042dcf8dee63527b103cc37abc238ea06150af38b6e", - "zh:ba94ffe0893ad60c0b70c402e163b4df2cf417e93474a9cc1a37535bba18f22d", - "zh:d5ba851d971ff8d796afd9a100acf55eaac0c197c6ab779787797ce66f419f0e", - "zh:e8c090d0c4f730c4a610dc4f0c22b177a0376d6f78679fc3f1d557b469e656f4", - "zh:ed7623acde26834672969dcb5befdb62900d9f216d32e7478a095d2b040a0ea7", + "zh:d8bf9ba43bd938faab37d8fb515c32a905d6dace60f5ff2663b06ffdc89a62e9", + "zh:e654be9d3980e7cc70f9825fe0d0205e254edd87832f18b2d7f9c72b09b776cd", + "zh:ee5ce6fbe75be3e90cabba3fad76fcfde50ab795e523b4ee917cfe8ba8ad42fe", + "zh:ef12098e7b3ddf9ab286bb209de87dfa8e52106049ced0841e3e6487dbff3659", ] } diff --git a/aws-lambda-tutorial/components/dynamodb-table/main.tf b/aws-lambda-tutorial/components/dynamodb-table/main.tf index a25e831..ef2b5f4 100644 --- a/aws-lambda-tutorial/components/dynamodb-table/main.tf +++ b/aws-lambda-tutorial/components/dynamodb-table/main.tf @@ -1,5 +1,6 @@ module "dynamodb_table" { - source = "terraform-aws-modules/dynamodb-table/aws" + source = "terraform-aws-modules/dynamodb-table/aws" + version = "~> 4.0.0" name = var.name hash_key = var.hash_key diff --git a/aws-lambda-tutorial/components/lambda-function/.terraform.lock.hcl b/aws-lambda-tutorial/components/lambda-function/.terraform.lock.hcl index 127a09b..fbd7f45 100644 --- a/aws-lambda-tutorial/components/lambda-function/.terraform.lock.hcl +++ b/aws-lambda-tutorial/components/lambda-function/.terraform.lock.hcl @@ -2,25 +2,25 @@ # Manual edits may be lost in future updates. provider "registry.terraform.io/hashicorp/aws" { - version = "5.41.0" + version = "5.61.0" constraints = ">= 4.0.0, >= 5.32.0" hashes = [ - "h1:DiX7N35G2NUQRyRGy90+gyePnhP4w77f8LrJUronotE=", - "zh:0553331a6287c146353b6daf6f71987d8c000f407b5e29d6e004ea88faec2e67", - "zh:1a11118984bb2950e8ee7ef17b0f91fc9eb4a42c8e7a9cafd7eb4aca771d06e4", - "zh:236fedd266d152a8233a7fe27ffdd99ca27d9e66a9618a988a4c3da1ac24a33f", - "zh:34bc482ea04cf30d4d216afa55eecf66854e1acf93892cb28a6b5af91d43c9b7", - "zh:39d7eb15832fe339bf46e3bab9852280762a1817bf1afc459eecd430e20e3ad5", - "zh:39fb07429c51556b05170ec2b6bd55e2487adfe1606761eaf1f2a43c4bb20e47", - "zh:71d7cd3013e2f3fa0f65194af29ee6f5fa905e0df2b72b723761dc953f4512ea", + "h1:qYXhPfMOxgOYuSjfe7+P2wdqx4oMkPYgH4XUN3fJb54=", + "zh:1a0a150b6adaeacc8f56763182e76c6219ac67de1217b269d24b770067b7bab0", + "zh:1d9c3a8ac3934a147569254d6e2e6ea5293974d0595c02c9e1aa31499a8f0042", + "zh:1f4d1d5e2e02fd5cccafa28dade8735a3059ed1ca3284fb40116cdb67d0e7ee4", + "zh:26be6f759bded469de477f54c7eb7a9ca9f137a3b52f9fd26cbd864f16973912", + "zh:276e308ae7aa281fe24f7275673aa05f00cb830b83c2b9797f9aa55f10769c52", + "zh:45c09beeadb4269d518de0bd341cbe9f061157ab54c543d39168ecefff40bbe2", + "zh:58fb5ef076dc63e284ce28b47b7cc35a17d2596f11e2373fe568c6140277e9d8", + "zh:64d51cc1ad412379f64b75883a881a5d682a8e9737ad14479f6a2d62e77f7dbe", + "zh:71e2e332317cf095288d65a801e95b65fd696204997b2db5250862d6c5669518", + "zh:9864014aa4716b5bfb3b27d009f158dd6a67c215fd0dfbe3a5d1a7cee72c5677", "zh:9b12af85486a96aedd8d7984b0ff811a4b42e3d88dad1a3fb4c0b580d04fa425", - "zh:9b271ae12394e7e2ce6da568b42226a146e90fd705e02a670fcb93618c4aa19f", - "zh:a884dd978859d001709681f9513ba0fbb0753d1d459a7f3434ecc5f1b8699c49", - "zh:b8c3c7dc10ae4f6143168042dcf8dee63527b103cc37abc238ea06150af38b6e", - "zh:ba94ffe0893ad60c0b70c402e163b4df2cf417e93474a9cc1a37535bba18f22d", - "zh:d5ba851d971ff8d796afd9a100acf55eaac0c197c6ab779787797ce66f419f0e", - "zh:e8c090d0c4f730c4a610dc4f0c22b177a0376d6f78679fc3f1d557b469e656f4", - "zh:ed7623acde26834672969dcb5befdb62900d9f216d32e7478a095d2b040a0ea7", + "zh:d8bf9ba43bd938faab37d8fb515c32a905d6dace60f5ff2663b06ffdc89a62e9", + "zh:e654be9d3980e7cc70f9825fe0d0205e254edd87832f18b2d7f9c72b09b776cd", + "zh:ee5ce6fbe75be3e90cabba3fad76fcfde50ab795e523b4ee917cfe8ba8ad42fe", + "zh:ef12098e7b3ddf9ab286bb209de87dfa8e52106049ced0841e3e6487dbff3659", ] } diff --git a/aws-lambda-tutorial/components/lambda-function/main.tf b/aws-lambda-tutorial/components/lambda-function/main.tf index 2bb9b07..ef5858c 100644 --- a/aws-lambda-tutorial/components/lambda-function/main.tf +++ b/aws-lambda-tutorial/components/lambda-function/main.tf @@ -1,5 +1,6 @@ module "lambda_function" { - source = "terraform-aws-modules/lambda/aws" + source = "terraform-aws-modules/lambda/aws" + version = "7.7.0" function_name = var.function_name image_uri = var.image_uri From 5d08272c5b29c6d604363bcdf134e267535ac95e Mon Sep 17 00:00:00 2001 From: Jordan Acosta Date: Tue, 6 Aug 2024 13:21:14 -0700 Subject: [PATCH 2/2] fix(byo-vpc-tutorial): pin module versions --- .../ecs-service/.terraform.lock.hcl | 34 +++++++++---------- .../components/ecs-service/alb.tf | 13 +++---- .../components/ecs-service/service.tf | 7 ++-- 3 files changed, 28 insertions(+), 26 deletions(-) diff --git a/byo-vpc-tutorial/components/ecs-service/.terraform.lock.hcl b/byo-vpc-tutorial/components/ecs-service/.terraform.lock.hcl index b5a2d84..09150ea 100644 --- a/byo-vpc-tutorial/components/ecs-service/.terraform.lock.hcl +++ b/byo-vpc-tutorial/components/ecs-service/.terraform.lock.hcl @@ -2,24 +2,24 @@ # Manual edits may be lost in future updates. provider "registry.terraform.io/hashicorp/aws" { - version = "5.35.0" - constraints = ">= 4.0.0, >= 4.40.0, >= 4.66.1, >= 5.33.0" + version = "5.61.0" + constraints = ">= 4.0.0, >= 4.40.0, >= 4.66.1, >= 5.59.0" hashes = [ - "h1:MKNFmhsOIirK7Qzr6TWkVaBcVGN81lCU0BPiaPOeQ8s=", - "zh:3a2a6f40db82d30ea8c5e3e251ca5e16b08e520570336e7e342be823df67e945", - "zh:420a23b69b412438a15b8b2e2c9aac2cf2e4976f990f117e4bf8f630692d3949", - "zh:4d8b887f6a71b38cff77ad14af9279528433e279eed702d96b81ea48e16e779c", - "zh:4edd41f8e1c7d29931608a7b01a7ae3d89d6f95ef5502cf8200f228a27917c40", - "zh:6337544e2ded5cf37b55a70aa6ce81c07fd444a2644ff3c5aad1d34680051bdc", - "zh:668faa3faaf2e0758bf319ea40d2304340f4a2dc2cd24460ddfa6ab66f71b802", - "zh:79ddc6d7c90e59fdf4a51e6ea822ba9495b1873d6a9d70daf2eeaf6fc4eb6ff3", - "zh:885822027faf1aa57787f980ead7c26e7d0e55b4040d926b65709b764f804513", - "zh:8c50a8f397b871388ff2e048f5eb280af107faa2e8926694f1ffd9f32a7a7cdf", + "h1:qYXhPfMOxgOYuSjfe7+P2wdqx4oMkPYgH4XUN3fJb54=", + "zh:1a0a150b6adaeacc8f56763182e76c6219ac67de1217b269d24b770067b7bab0", + "zh:1d9c3a8ac3934a147569254d6e2e6ea5293974d0595c02c9e1aa31499a8f0042", + "zh:1f4d1d5e2e02fd5cccafa28dade8735a3059ed1ca3284fb40116cdb67d0e7ee4", + "zh:26be6f759bded469de477f54c7eb7a9ca9f137a3b52f9fd26cbd864f16973912", + "zh:276e308ae7aa281fe24f7275673aa05f00cb830b83c2b9797f9aa55f10769c52", + "zh:45c09beeadb4269d518de0bd341cbe9f061157ab54c543d39168ecefff40bbe2", + "zh:58fb5ef076dc63e284ce28b47b7cc35a17d2596f11e2373fe568c6140277e9d8", + "zh:64d51cc1ad412379f64b75883a881a5d682a8e9737ad14479f6a2d62e77f7dbe", + "zh:71e2e332317cf095288d65a801e95b65fd696204997b2db5250862d6c5669518", + "zh:9864014aa4716b5bfb3b27d009f158dd6a67c215fd0dfbe3a5d1a7cee72c5677", "zh:9b12af85486a96aedd8d7984b0ff811a4b42e3d88dad1a3fb4c0b580d04fa425", - "zh:a2f5d2553df5573a060641f18ee7585587047c25ba73fd80617f59b5893d22b4", - "zh:c43833ae2a152213ee92eb5be7653f9493779eddbe0ce403ea49b5f1d87fd766", - "zh:dab01527a3a55b4f0f958af6f46313d775e27f9ad9d10bedbbfea4a35a06dc5f", - "zh:ed49c65620ec42718d681a7fc00c166c295ff2795db6cede2c690b83f9fb3e65", - "zh:f0a358c0ae1087c466d0fbcc3b4da886f33f881a145c3836ec43149878b86a1a", + "zh:d8bf9ba43bd938faab37d8fb515c32a905d6dace60f5ff2663b06ffdc89a62e9", + "zh:e654be9d3980e7cc70f9825fe0d0205e254edd87832f18b2d7f9c72b09b776cd", + "zh:ee5ce6fbe75be3e90cabba3fad76fcfde50ab795e523b4ee917cfe8ba8ad42fe", + "zh:ef12098e7b3ddf9ab286bb209de87dfa8e52106049ced0841e3e6487dbff3659", ] } diff --git a/byo-vpc-tutorial/components/ecs-service/alb.tf b/byo-vpc-tutorial/components/ecs-service/alb.tf index 8d7817b..4041c1f 100644 --- a/byo-vpc-tutorial/components/ecs-service/alb.tf +++ b/byo-vpc-tutorial/components/ecs-service/alb.tf @@ -1,5 +1,6 @@ module "ingress" { - source = "terraform-aws-modules/alb/aws" + source = "terraform-aws-modules/alb/aws" + version = "~> 9.10.0" name = var.service_name vpc_id = var.vpc_id @@ -52,11 +53,11 @@ module "ingress" { target_groups = { api = { - name_prefix = "api" - protocol = "HTTP" - backend_port = var.container_port - target_type = "ip" - create_attachment = false + name_prefix = "api" + protocol = "HTTP" + backend_port = var.container_port + target_type = "ip" + create_attachment = false deregistration_delay = 5 load_balancing_cross_zone_enabled = true diff --git a/byo-vpc-tutorial/components/ecs-service/service.tf b/byo-vpc-tutorial/components/ecs-service/service.tf index d948a1f..3642776 100644 --- a/byo-vpc-tutorial/components/ecs-service/service.tf +++ b/byo-vpc-tutorial/components/ecs-service/service.tf @@ -1,12 +1,13 @@ module "service" { - source = "terraform-aws-modules/ecs/aws//modules/service" + source = "terraform-aws-modules/ecs/aws//modules/service" + version = "~> 5.11.0" name = var.service_name cluster_arn = var.cluster_arn desired_count = 3 - cpu = 1024 - memory = 4096 + cpu = 1024 + memory = 4096 container_definitions = { api = {