[----------------------- UPDATE --------------------------]
I have tried a tutorial to integrate terraform with s3 now. The S3 bucket is created and I have created an IAM user, and I am using its Access key and secret key.
Nonetheless I keep getting errors regarding the providers after terraform init
:
backend.tf
terraform {
required_version = ">=0.12.0"
backend "s3" {
region = "us-east-1"
key = "terraform.tfstate"
profile = "tu"
bucket = "terraformstatebucket3107"
}
}
config file in .aws folder
[tu]
region = us-east-1
output = json
credentials file in .aws folder
[tu]
aws_access_key_id = AKIA*****************
aws_secret_access_key = nn3M1*****************
Error:
Initializing the backend...
Error: error configuring S3 Backend: no valid credential sources for S3 Backend found.
Please see https://www.terraform.io/docs/backends/types/s3.html
for more information about providing credentials.
Error: NoCredentialProviders: no valid providers in chain. Deprecated.
For verbose messaging see aws.Config.CredentialsChainVerboseErrors
terraform init
prior to running apply? – Marko Eprofile = "default"
line – lxop