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”
}