July 2017
Beginner
208 pages
5h 10m
English
If Terraform can't find keys in the template or environment variables, it will try to fetch them from the credentials file, which is typically stored in the ~/.aws/ credentials. If you have previously installed and configured AWS CLI, then you already have a credentials file generated for you. If you have not done this, then you can add it yourself, with the content as follows:
[default] aws_access_key_id = xxxxxxxxxxxxx aws_secret_access_key = xxxxxxxxxxxxx
You should always avoid setting credentials directly in the template. It's up to you whether you use environment variables or a credentials file. Whichever method you picked, let's add the following configuration to template.tf:
provider "aws" { region = "eu-central-1" ...Read now
Unlock full access