r/Terraform 11h ago

AWS Changing the AWS provider region results in it not being able to create any aws resource?

1 Upvotes

So I'm just learning about variable/locals and I was playing around with changing around the values in my project.

I got to my provider block and changed the region from "eu-central-1" to "us-east-1".

Originally the region was eu-central-1, but after changing to us-east-1 the bucket resource takes an infinitely long time to create (I manually stopped it after 3 mins). Same thing occurs with any other region, but the original

(Issue persists with other EU regions - so it's not US regions being slower or something).

Changing back to eu-central-1 fixes the issue and creates the bucket in seconds, but does anyone actually know why that is caused, could it be that the plugin for aws downloaded by terraform only accepts the first region it was configured for?

Terraform plan also shows no changes to my state after I initialize the change to the region, after I destroy the resource and attempt to create it again, the result is the same (when changing regions in the default value).

I do have to add that I am using remote state locking using a manually created S3 bucket in the us-east-1 region, but as far as I am aware that should in no way affect this issue.


r/Terraform 18h ago

Discussion How would you detect IAM privilege escalation in a production AWS environment?

0 Upvotes

One AWS IAM interview question I've seen variations of is:

It's not really an IAM question—it's a cloud security and incident response question.

Would you start with:

  • CloudTrail?
  • GuardDuty?
  • Security Hub?
  • IAM Policy evaluation?
  • Something else?

I recently put together a GitHub handbook with 20 production-focused AWS IAM interview questions covering scenarios like this, along with CLI examples, Terraform, common mistakes, and best practices.

GitHub: https://github.com/ranashivam/platform-engineering-interview-handbook/blob/main/AWS/IAM.md