Skip to main content

Posts

Showing posts with the label Terraform with AWS

Terraform with AWS

  🔐 Getting Started: AWS Setup and Authentication To manage AWS resources with Terraform, you first need to set up secure authentication. The recommended approach is using IAM roles , especially in CI/CD pipelines, as they provide short-term, rotating credentials. 1. Create an IAM User You can create a dedicated IAM user for Terraform in the AWS Management Console : Navigate to IAM > Users > Create user . Give the user a descriptive name, such as terraform-user . Select the Access key - Programmatic access option. Attach a policy with the necessary permissions. Adhere to the principle of least privilege ; avoid using AdministratorAccess unless strictly necessary . Note the Access Key ID and Secret Access Key after creation, as they are only shown once. 2. Configure Credentials You can configure the credentials using one of the following common methods: Option 1: AWS CLI (Recommended) The cleanest and most secure method is to use the AWS CLI tool, which stores credent...