When I plan or apply I get the following error, see below. I updated/checked the paths and yes of course the creds are there. Bit lost what the issue is as I even read the TF provider documentation and everything 'seems' fine (though I never learned TF before).
error
│ Warning: Argument is deprecated
│
│ with provider["registry.terraform.io/hashicorp/aws"],
│ on main.tf line 3, in provider "aws":
│ 3: shared_credentials_file = var.shared_credentials_file
│
│ Use shared_credentials_files instead.
│
│ (and one more similar warning elsewhere)
╵
╷
│ Error: error configuring Terraform AWS Provider: failed to get shared config profile, terraform
│
│ with provider["registry.terraform.io/hashicorp/aws"],
│ on main.tf line 2, in provider "aws":
│ 2: provider "aws" {
│
variables.tf
variable "shared_credentials_file" {
description = "Path to your AWS credentials file"
type = string
default = "~/.aws/credentials"
}
for me at least the above credentials files does work when I cat the path
main.tf
# Specify the provider and access details
provider "aws" {
shared_credentials_file = var.shared_credentials_file
region = var.region
profile = var.profile
}
Description of the issue:
When I plan or apply I get the following error, see below. I updated/checked the paths and yes of course the creds are there. Bit lost what the issue is as I even read the TF provider documentation and everything 'seems' fine (though I never learned TF before).
error
variables.tf
for me at least the above credentials files does work when I cat the path
main.tf