terraform-aws-modules / terraform-aws-eks

Terraform module to create Amazon Elastic Kubernetes (EKS) resources 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/eks/aws
Apache License 2.0
4.48k stars 4.09k forks source link

feat: Use aws_iam_role_policies_exclusive #3194

Closed kimxogus closed 4 weeks ago

kimxogus commented 4 weeks ago

Description

Moved inline_policy in aws_iam_role to aws_iam_role_policy and aws_iam_role_policies_exclusive as force_detach_policies is true.

Motivation and Context

inline_policy block in aws_iam_role was deprecated since aws provider v5.68.0 as aws_iam_role_policies_exclusive was added. https://github.com/hashicorp/terraform-provider-aws/pull/39203 https://github.com/hashicorp/terraform-provider-aws/releases/tag/v5.68.0

Breaking Changes

No. This change doesn't remove existing inline policies in migration process. I checked using TF_LOG=debug and there was no aws api call to remove existing inline policies.

How Has This Been Tested?

kimxogus commented 4 weeks ago

Sorry, my local fork was too outdated.