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:
Error: Failed to query available provider packages
│
│ Could not retrieve the list of available versions for provider hashicorp/aws:
│ locked provider registry.terraform.io/hashicorp/aws 3.58.0 does not match
│ configured version constraint ~> 4.0.0; must use terraform init -upgrade to
│ allow selection of new versions
so i changed the constraint in main.tf to version = "~> 3.58.0"
the error after applying:
Error: Invalid data source
│
│ on main.tf line 24, in data "aws_s3_objects" "data_bucket":
│ 24: data "aws_s3_objects" "data_bucket" {
│
│ The provider hashicorp/aws does not support data source "aws_s3_objects".
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:
Error: Value for unconfigurable attribute
│
│ with aws_s3_bucket.data,
│ on main.tf line 21, in resource "aws_s3_bucket" "data":
│ 21: acl = "private"
│
│ Can't configure a value for "acl": its value will be decided automatically
│ based on the result of applying this configuration.
╵
what should i do?