Skip to content

Commit 7878cd2

Browse files
authored
Merge pull request #2888 from kakakakakku/apigw-http-api-lambda-terraform
apigw-http-api-lambda-terraform: Update AWS Provider to v6 for Python 3.14
2 parents d04ebf1 + b3089de commit 7878cd2

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
src.zip

apigw-http-api-lambda-terraform/main.tf

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
aws = {
44
source = "hashicorp/aws"
5-
version = "~> 4.0.0"
5+
version = "~> 6"
66
}
77
random = {
88
source = "hashicorp/random"
@@ -28,9 +28,13 @@ resource "aws_s3_bucket" "lambda_bucket" {
2828
force_destroy = true
2929
}
3030

31-
resource "aws_s3_bucket_acl" "private_bucket" {
31+
resource "aws_s3_bucket_public_access_block" "lambda_bucket" {
3232
bucket = aws_s3_bucket.lambda_bucket.id
33-
acl = "private"
33+
34+
block_public_acls = true
35+
block_public_policy = true
36+
ignore_public_acls = true
37+
restrict_public_buckets = true
3438
}
3539

3640
data "archive_file" "lambda_zip" {
@@ -171,4 +175,4 @@ resource "aws_lambda_permission" "api_gw" {
171175
principal = "apigateway.amazonaws.com"
172176

173177
source_arn = "${aws_apigatewayv2_api.lambda.execution_arn}/*/*"
174-
}
178+
}

0 commit comments

Comments
 (0)