LAB - Terraform with AWS Resources S3

LAB Q8 - The main.tf file is empty. Use it to create a new S3 with the following specifications:
resource name: dc_bucket
bucket name: dc_is_better_than_marvel
acl: public-read-write

Once the resource block is complete, run a terraform init, plan and apply to try and create the bucket.

If unsure, refer to the documentation. The documentation tab is available at the top right panel.
(it’s ok if you get an error! Move on to the next question!)

Output:
iac-server $ terraform plan

Warning: Argument is deprecated

Use s3_use_path_style instead.

Error: Value for unconfigurable attribute

on main.tf line 3, in resource “aws_s3_bucket” “dc_bucket”:
3: acl = “public-read-write”

Can’t configure a value for “acl”: its value will be decided automatically
based on the result of applying this configuration.

iac-server $

Main.tf
resource “aws_s3_bucket” “dc_bucket” {

bucket = “dc_is_better_than_marvel”

acl = “public-read-write”

}

you have to add the aws_s3_buccket_acl object
check this:

resource "aws_s3_bucket" "b" {
  bucket = "my-tf-test-bucket"

  tags = {
    Name        = "My bucket"
    Environment = "Dev"
  }
}

resource "aws_s3_bucket_acl" "example" {
  bucket = aws_s3_bucket.b.id
  acl    = "private"
}

same issue if someone know, how to do it please let me know @Ayman the syntax you shared didn’t worked even.

there’s is a deliberate error in this question you’ll see what’s wrong when you pass to the next question don’t waste your time searching for the error

Hello, @mohan-anna
We fixed this issue. Please give it another try.

Same issue here at lab-terraform-modules

Warning: Argument is deprecated
Use s3_use_path_style instead

But on apply I get

Apply complete! Resources: 3 added, 0 changed, 0 destroyed.

So apply worked.