-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Open
Labels
Description
Description
Policy created for karpenter controller doesn't work for AWS China. The problem is inside controller's policy: https://github.com/terraform-aws-modules/terraform-aws-eks/blob/v21.15.1/modules/karpenter/policy.tf#L237
Code contemplates adding ec2.amazonaws.com.cn when executing in China. The problem is that aws_service_principal is not working as expected. There's an open issue for it here: hashicorp/terraform-provider-aws#46209 that I'm able to reproduce.
I propose reverting to previous code in v20. I've already tested it in my local setup and it works.
- Add local
dns_suffix = data.aws_partition.current[0].dns_suffixin main.tf - Modify line 237 in policy.tf to:
values = distinct(["ec2.${local.dns_suffix}", "ec2.amazonaws.com"])
I'd be happy to add the PR for this one.
Reactions are currently unavailable