Tutorial:Develop configuration with console - data source not supported

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?

It looks like GitHub - hashicorp/learn-terraform-console has incorrectly upgraded for major version 4 of the Terraform AWS provider.

If your aim is to just complete the tutorial as a learning experience, the simplest option would be to use a version of the Git repository from before the “Update for AWS provider 4” commit, whilst you wait for the author to respond to your GitHub issue.

1 Like

i have another problem, as we can see command doesn’t answer with output expected at point “Add bucket policy”
image
can it be related to next problem, which concerns point “Load data into bucket”?

In the first screenshot, you typed encode not decode.

In the second screenshot, you are using a command written for Linux shells at a Windows command prompt, which doesn’t support that.

1 Like