0
Hello I’m taking a terraform course and I came across a mistake I’m not getting through.
I created a Docker container with terraform and it has the following main.Tf,ec2.Tf,output.Tf,variable.tf. I created an IAM no aws and gave Administratoraccess permission to it, inside the container export my key and secret key, also create a Bucket no aws e ta as I publish its permissions.
When inside the container I’m giving the command terraform init
Only he’s making that mistake:
Initializing the backend... Error Refreshing state: Allaccessdisabled: All access to this Object has been disabled status code: 403, request id: 63C2B2B19AFF684C, host id: N33/aFmFs5JfC3BZcWazaotlEjp+wKk5kfR3Pq1Kg7NG1soDv06wyJTK9JbxKWaJnD215PpKU50=
provider "aws" {
region = "us-east-2"
version = "~> 2.0"
}
terraform {
backend "s3" {
# Lembre de trocar o bucket para o seu, não pode ser o mesmo nome
bucket = "terraformgerson"
key = "terraform-test.tfstate"
region = "us-east-2"
encrypt = "true"
dynamodb_table = "terraform-state-lock-dynamo"
}
}
the buccket I created in this aws with the name terraformgerson
This dynamodb table is created tbm? terraform-state-lock-Dynamo
– gmsantos