Use the command aws configure
and respond the prompts
Manually create the bucket used to hold Terraform state.
aws s3 mb s3://<NAME_OF_THE_BUCKET> --region eu-east-1
In infrastructure/environments/production/main.tf
, ensure that the hardcoded s3 bucket name matches the name of the bucket you created in the previous step.
terraform {
backend "s3" {
key = "terraform.state"
bucket = "pataruco"
region = "eu-east-1"
}
}
Run terraform init
followed by terraform apply
If you are happy that Terraform will create the correct resources, enter yes