terraform-aws-modules / terraform-aws-s3-bucket

Terraform module to create AWS S3 resources πŸ‡ΊπŸ‡¦

Home Page:https://registry.terraform.io/modules/terraform-aws-modules/s3-bucket/aws

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong definition of grant for s3

m4t22 opened this issue Β· comments

Description

While migrating to s3 module we have encountered an issue with grant parameter. It fails the terraform plan for any configuration.

  • βœ‹ I have searched the open/closed issues and my issue is not listed.

Versions

  • Module version [Required]: 3.2.0

  • Terraform version: 1.1.9

  • Provider version(s): 4.13.0

Reproduction Code [Required]

You can try prepare plan for this one it is bound to fail:
https://github.com/terraform-aws-modules/terraform-aws-s3-bucket/blob/master/examples/complete/main.tf

Steps to reproduce the behavior:
Any definition of grants for s3 module:

grant = [{
    type       = "CanonicalUser"
    permission = "FULL_CONTROL"
    id         = data.aws_canonical_user_id.current.id
 }]

Expected behavior

Plan shouldn't fail.

Actual behavior

Returns error on terraform plan.

Terminal Output Screenshot(s)

β•·
β”‚ Error: Unsupported attribute
β”‚
β”‚   on .terraform/modules/s3_qf_media_dump_bucket/main.tf line 68, in resource "aws_s3_bucket_acl" "this":
β”‚   68:           permission = grant.value.permission
β”‚     β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚     β”‚ grant.value is object with 4 attributes
β”‚
β”‚ This object does not have an attribute named "permission".
β•΅

Additional context

I have addressed it in #163

This issue has been resolved in version 3.2.2 πŸŽ‰

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.