Interview Prep/Terraform/Authentication and Cloud API Errors

`Unsupported: Your requested instance type (t3.micro) is not supported in your requested Availability Zone (us-east-1e)`.

IntermediateTroubleshootingAuthentication and Cloud API Errors
Answer

Likely causes → Hardcoded AZs or data "aws_availability_zones" returning AZs without that instance type.

Diagnose →

aws ec2 describe-instance-type-offerings --location-type availability-zone \
  --filters Name=instance-type,Values=t3.micro --query 'InstanceTypeOfferings[].Location'

Fix → Use data "aws_ec2_instance_type_offerings" to pick supported AZs, or exclude the bad AZ.

Prevent → Don't hardcode AZ names; AZ letters differ per account.

All Terraform questions

More on Authentication and Cloud API Errors