Open ihavenoideaforusername opened 2 years ago
Hi about the "terraform apply"... I had the same issue there is an issue in the main.tf error creating s3 bucket acl the bucket does not allow acls.... I'm not sure but after modifying like the following it worked: (referring to the registry https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_acl)
provider "aws" { region = var.aws_region
default_tags { tags = { hashicorp-learn = "console" } } }
resource "aws_s3_bucket" "data" { bucket_prefix = var.bucket_prefix
force_destroy = true }
resource "aws_s3_bucket_ownership_controls" "data" { bucket = aws_s3_bucket.data.id rule { object_ownership = "BucketOwnerPreferred" } }
resource "aws_s3_bucket_acl" "data" { depends_on = [aws_s3_bucket_ownership_controls.data] bucket = aws_s3_bucket.data.id acl = "private" }
data "aws_s3_objects" "data_bucket" { bucket = aws_s3_bucket.data.bucket }
i was doing this tutorial Develop Configuration with the Console | Terraform - HashiCorp Learn
and i came across a problem with first
terraform init
i got following error:so i changed the constraint in main.tf to
version = "~> 3.58.0"
the error after applying:so i delete the folder, git cloned once again and this time i used previously adviced
terraform init -upgrade
,after using
terraform apply
i got error:what should i do?