Integrating with AWS
As we discussed earlier how you can authenticate Terraform to Azure, let's now try to understand how we can authenticate Terraform with AWS. Here are the methods that allow Terraform to get authenticated in AWS:
- Static credentials
- Environment variables
- Shared credentials/configuration file
- CodeBuild, Elastic Container Service (ECS), and Elastic Kubernetes Service (EKS) roles
- Elastic Compute Cloud (EC2) Instance Metadata Service (IMDS), and IMDSv2
For detailed information about how you can authenticate Terraform to AWS, you can visit https://registry.terraform.io/providers/hashicorp/aws/latest/docs. Discussing all of the methods is beyond the scope of this book, but we will nevertheless discuss one of the methods and show you how you can provision services in AWS.
Authentication using an access key ID and secret
To authenticate using an access key ID and secret, perform the following steps:
- Log in to your AWS console...