Skip to content

Commit 2f3eba0

Browse files
feat: Bump terraform aws provider required version to v4.x
1 parent 382469e commit 2f3eba0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ locals {
1515
# s3_* - to get package from S3
1616
s3_bucket = var.s3_existing_package != null ? lookup(var.s3_existing_package, "bucket", null) : (var.store_on_s3 ? var.s3_bucket : null)
1717
s3_key = var.s3_existing_package != null ? lookup(var.s3_existing_package, "key", null) : (var.store_on_s3 ? var.s3_prefix != null ? format("%s%s", var.s3_prefix, replace(local.archive_filename_string, "/^.*//", "")) : replace(local.archive_filename_string, "/^\\.//", "") : null)
18-
s3_object_version = var.s3_existing_package != null ? lookup(var.s3_existing_package, "version_id", null) : (var.store_on_s3 ? try(aws_s3_bucket_object.lambda_package[0].version_id, null) : null)
18+
s3_object_version = var.s3_existing_package != null ? lookup(var.s3_existing_package, "version_id", null) : (var.store_on_s3 ? try(aws_s3_object.lambda_package[0].version_id, null) : null)
1919

2020
}
2121

@@ -96,7 +96,7 @@ resource "aws_lambda_function" "this" {
9696
# When a lambda function is invoked, AWS creates the log group automatically if it doesn't exist yet.
9797
# Without the dependency, this can result in a race condition if the lambda function is invoked before
9898
# Terraform can create the log group.
99-
depends_on = [null_resource.archive, aws_s3_bucket_object.lambda_package, aws_cloudwatch_log_group.lambda]
99+
depends_on = [null_resource.archive, aws_s3_object.lambda_package, aws_cloudwatch_log_group.lambda]
100100
}
101101

102102
resource "aws_lambda_layer_version" "this" {
@@ -117,10 +117,10 @@ resource "aws_lambda_layer_version" "this" {
117117
s3_key = local.s3_key
118118
s3_object_version = local.s3_object_version
119119

120-
depends_on = [null_resource.archive, aws_s3_bucket_object.lambda_package]
120+
depends_on = [null_resource.archive, aws_s3_object.lambda_package]
121121
}
122122

123-
resource "aws_s3_bucket_object" "lambda_package" {
123+
resource "aws_s3_object" "lambda_package" {
124124
count = local.create && var.store_on_s3 && var.create_package ? 1 : 0
125125

126126
bucket = var.s3_bucket

versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 3.69"
7+
version = ">= 4.0"
88
}
99
external = {
1010
source = "hashicorp/external"

0 commit comments

Comments
 (0)