From a3071b3c23f310c4428bff7abf6527895ed452fc Mon Sep 17 00:00:00 2001 From: KyleKotowick Date: Fri, 28 Apr 2023 13:40:58 -0400 Subject: [PATCH] Update versions of many modules and providers --- archive.tf | 4 ++-- assertions.tf | 14 +++++++------- logs.tf | 2 +- main.tf | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/archive.tf b/archive.tf index 5465ac3..407810a 100644 --- a/archive.tf +++ b/archive.tf @@ -1,10 +1,10 @@ // If the archive_output_name variable is provided, it must end in ".zip" module "assert_proper_output_archive_name" { source = "Invicton-Labs/assertion/null" - version = "0.2.1" + version = "~>0.2.4" count = var.archive_output_name != null ? 1 : 0 condition = length(var.archive_output_name) > 4 && lower(substr(var.archive_output_name, length(var.archive_output_name) - 4, 4)) == ".zip" && length(regexall("[/\\\\]+", var.archive_output_name)) == 0 - error_message = "The `archive_output_name` variable, if provided, must end in `.zip` and may not contain `\\` or `/`." + error_message = "The `archive_output_name` variable, if provided, must end in `.zip` and may not contain `\\` or `/` (received: \"${var.archive_output_name}\")." } // Create a UUID to be used for the output archive file name, so it doesn't clash with others diff --git a/assertions.tf b/assertions.tf index 2ede3b5..68a039a 100644 --- a/assertions.tf +++ b/assertions.tf @@ -1,7 +1,7 @@ // Assert that we've only provided a single source for the Lambda code module "assert_single_source1" { source = "Invicton-Labs/assertion/null" - version = "0.2.1" + version = "~>0.2.4" condition = var.source_directory == null || ( var.unzipped_source_file == null && var.lambda_config.filename == null && @@ -16,7 +16,7 @@ module "assert_single_source1" { } module "assert_single_source2" { source = "Invicton-Labs/assertion/null" - version = "0.2.1" + version = "~>0.2.4" condition = var.unzipped_source_file == null || ( var.source_directory == null && var.lambda_config.filename == null && @@ -32,7 +32,7 @@ module "assert_single_source2" { // Ensure that if a filename is provided, no source hash is provided (it will automatically be calculated) module "assert_filename_source_hash" { source = "Invicton-Labs/assertion/null" - version = "0.2.1" + version = "~>0.2.4" condition = var.lambda_config.filename == null ? true : var.lambda_config.source_code_hash == null error_message = "The `source_code_hash` field in the `lambda_config` variable cannot be provided if the `filename` field in the `lambda_config` variable is provided (the source file hash will be automatically calculated)." } @@ -40,7 +40,7 @@ module "assert_filename_source_hash" { // Ensure that if an IAM role for the Lambda execution was provided, there weren't also IAM policy ARNs provided module "assert_no_policy_arns_for_provided_role" { source = "Invicton-Labs/assertion/null" - version = "0.2.1" + version = "~>0.2.4" condition = var.lambda_config.role == null ? true : length(var.role_policy_arns) == 0 error_message = "The `role_policy_arns` variable cannot be provided if the `role` field in the `lambda_config` variable is provided." } @@ -48,7 +48,7 @@ module "assert_no_policy_arns_for_provided_role" { // Ensure that if an IAM role for the Lambda execution was provided, there weren't also IAM policies provided module "assert_no_policies_for_provided_role" { source = "Invicton-Labs/assertion/null" - version = "0.2.1" + version = "~>0.2.4" condition = var.lambda_config.role == null ? true : length(var.role_policies) == 0 error_message = "The `role_policies` variable cannot be provided if the `role` field in the `lambda_config` variable is provided." } @@ -56,7 +56,7 @@ module "assert_no_policies_for_provided_role" { // Ensure that Edge functions are only defined in the us-east-1 region module "assert_edge_region" { source = "Invicton-Labs/assertion/null" - version = "0.2.1" + version = "~>0.2.4" condition = !var.edge ? true : data.aws_region.current.name == "us-east-1" error_message = "If the `edge` variable is `true`, the lambda must be created in the `us-east-1` region." } @@ -64,7 +64,7 @@ module "assert_edge_region" { // Ensure that Edge functions are published module "assert_edge_published" { source = "Invicton-Labs/assertion/null" - version = "0.2.1" + version = "~>0.2.4" condition = !var.edge ? true : var.lambda_config.publish == true error_message = "If the `edge` variable is `true`, the `publish` variable in `lambda_config` must also be `true`." } diff --git a/logs.tf b/logs.tf index f39121d..c603a0b 100644 --- a/logs.tf +++ b/logs.tf @@ -1,7 +1,7 @@ // Create the Cloudwatch log group module "log_group" { source = "Invicton-Labs/log-group/aws" - version = "~>0.4.0" + version = "~>0.5.0" log_group_config = { name = "/aws/lambda/${var.edge ? "us-east-1." : ""}${var.lambda_config.function_name}" retention_in_days = var.cloudwatch_logs_retention_days diff --git a/main.tf b/main.tf index a277327..c7a4fc8 100644 --- a/main.tf +++ b/main.tf @@ -1,13 +1,13 @@ terraform { - required_version = ">= 1.3" + required_version = ">= 1.4.6" required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.47" + version = ">= 4.64" } archive = { source = "hashicorp/archive" - version = ">= 2.2.0" + version = ">= 2.3.0" } } }