Untitled Deck Flashcards
What is the main topic of the video?
The video discusses the authentication configuration specific to the AWS provider.
What method has been used for AWS access and secret keys in Terraform configuration?
AWS access and secret keys have been manually hard coded within the provider block in the Terraform configuration file.
Why is hard coding AWS access and secret keys not optimal?
Hard coding keys can lead to security issues, as developers may accidentally commit them to public or private GitHub repositories.
What happens if access and secret keys are removed from the provider configuration?
Terraform will not be able to connect to AWS and authenticate to create resources.
What is one recommended alternative to hard coding AWS credentials?
Specify the config and credentials files in a separate location on your workstation.
What is a potential issue with using separate credential files in a team?
Different team members may have different locations for their credential files, leading to inconsistencies.
Where does Terraform look for AWS credentials by default on Linux and macOS?
Terraform looks for credentials at HOME/.aws/config and HOME/.aws/credentials.
Where does Terraform look for AWS credentials by default on Windows?
Terraform looks for credentials at USERPROFILE%.aws\config and USERPROFILE%.aws\credentials.
What is the benefit of installing AWS CLI?
AWS CLI allows customers to manage AWS resources directly from the command line.
Where does AWS CLI store the access and secret keys?
AWS CLI stores the access and secret keys in the same locations as Terraform: .aws/config and .aws/credentials.
What command is used to configure AWS CLI with access and secret keys?
The command used is ‘aws configure’.
What happens when you run ‘terraform plan’ without valid credentials?
You will receive an error stating that no valid credential sources for AWS provider were found.
What should you do if you want to confirm that Terraform is working correctly after configuring AWS CLI?
Run ‘terraform apply’ with auto-approve to create resources.
What are some other methods for AWS authentication mentioned in the video?
You can use environment variables, shared config files, shared credentials files, or assume an IAM role.
Why is it recommended to use AWS CLI for storing credentials?
Using AWS CLI is beneficial for managing credentials securely and supports single sign-on solutions.