Static credentials¶
Hard-coding credentials directly into the Terraform provider block.
Static credentials involve providing the AWS Access Key ID
and Secret Access Key
directly in your Terraform provider block. This method is the simplest to implement but it's generally considered insecure, as your sensitive AWS keys are hard-coded into your script.
Example
In this example, replace "your-access-key-id"
and "your-secret-access-key"
with your actual AWS Access Key ID and Secret Access Key respectively. The region
field should also be replaced with the AWS region you wish to work in.
Important
This method poses a high security risk, especially if your Terraform scripts are stored in a version control system. It is generally recommended for learning purposes or testing environments, but should be avoided in production.