Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Breaking change with aws provider on v4.0 #268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lays147 opened this issue Feb 14, 2022 · 7 comments
Closed

Breaking change with aws provider on v4.0 #268

lays147 opened this issue Feb 14, 2022 · 7 comments

Comments

@lays147
Copy link

lays147 commented Feb 14, 2022

Description

Hi, last week the 4.0 version of the aws provider was released, and it broke terraform plan using this module because of changes in s3 api in this new version.

Versions

  • Terraform:
    1.1.4

  • Provider(s):
    provider registry.terraform.io/hashicorp/aws v4.0.0

  • Module:
    This one

Reproduction

Steps to reproduce the behavior:

  1. Create a lambda function using this module
  2. Run terraform plan

Code Snippet to Reproduce

Expected behavior

Deploy the module with success.

Actual behavior

Terraform plan fails because of s3 errors.

Terminal Output Screenshot(s)

╷
│ Warning: Argument is deprecated
│ 
│   with module.toil_tools_lambda_handler.aws_s3_bucket_object.lambda_package,
│   on .terraform/modules/toil_tools_lambda_handler/main.tf line 124, in resource "aws_s3_bucket_object" "lambda_package":
│  124:   bucket        = var.s3_bucket
│ 
│ Use the aws_s3_object resource instead
│ 
│ (and one more similar warning elsewhere)
╵
╷
│ Error: Value for unconfigurable attribute
│ 
│   with aws_s3_bucket.this,
│   on bucket.tf line 6, in resource "aws_s3_bucket" "this":
│    6: resource "aws_s3_bucket" "this" {
│ 
│ Can't configure a value for "server_side_encryption_configuration": its
│ value will be decided automatically based on the result of applying this
│ configuration.
╵
╷
│ Error: Value for unconfigurable attribute
│ 
│   with aws_s3_bucket.this,
│   on bucket.tf line 6, in resource "aws_s3_bucket" "this":
│    6: resource "aws_s3_bucket" "this" {
│ 
│ Can't configure a value for "versioning": its value will be decided
│ automatically based on the result of applying this configuration.
╵
╷
│ Error: Value for unconfigurable attribute
│ 
│   with aws_s3_bucket.this,
│   on bucket.tf line 10, in resource "aws_s3_bucket" "this":
│   10:   acl    = "private"
│ 
│ Can't configure a value for "acl": its value will be decided automatically
│ based on the result of applying this configuration.
╵

Additional context

@antonbabenko
Copy link
Member

Thanks for opening this issue. One more thing to work on and think about :)

For the time being, please use AWS provider version 3.

@antonbabenko
Copy link
Member

I've just scheduled this for Friday - https://www.youtube.com/watch?v=CqRU41N6V68

@MooreDerek
Copy link

@lays147 I don't the issue is with this module. There is no bucket.tf in the codebase. I think the issue is the upgrade to v4 of the provider has broken the codebase that this was raised on. The server side encryption and ACL are being set in the S3 Bucket Object here -> https://github.com/terraform-aws-modules/terraform-aws-lambda/blob/master/main.tf#L125

@iainhtp
Copy link

iainhtp commented Mar 1, 2022

Interested in a version that works with terraform provider 4.2.0, since we require this for AWS Managed Grafana and we are trying to deploy a Grafana workspace with an associated Lambda function !

@guillaumelecerf
Copy link

The deprecation warning is addressed in #280

@antonbabenko
Copy link
Member

Please use version 3.0.0 of this module to use AWS provider version 4.

Fixed by #296

@github-actions
Copy link

github-actions bot commented Nov 8, 2022

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants