You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
set var.iam_role_path to an arbitrary value, for example "my_security_path"
run terraform plan.
Expected behaviour
The ARN of the EKS cluster role used in the KMS key policy should include the path specified in var.iam_role_path.
Actual behaviour
The ARN of the EKS cluster role in the KMS key policy does not include the path. Therefore, the KMS key creation fails with "invalid principal" errors.
Terminal Output Screenshot(s)
This example uses a module that wraps the eks_blueprints module (module.platform). The module uses the following to invoke the eks_blueprints:
Recommended or not, the path here should be respected if passed. KMS does support the path, and the authenticator does work (if you strip the path out when passing it).
Description
When using
var.iam_role_path
, that path is not respected in the KMS key policy granting that role the required permissions.Before you submit an issue, please perform the following first:
.terraform
directory (! ONLY if state is stored remotely, which hopefully you are following that best practice!):rm -rf .terraform/
terraform init
Versions
Module version: 4.13.1 (latest from main)
Terraform version:
v1.2.9
Provider version(s):
Reproduction Code
Steps to reproduce the behavior:
var.iam_role_path
to an arbitrary value, for example "my_security_path"terraform plan
.Expected behaviour
The ARN of the EKS cluster role used in the KMS key policy should include the path specified in
var.iam_role_path
.Actual behaviour
The ARN of the EKS cluster role in the KMS key policy does not include the path. Therefore, the KMS key creation fails with "invalid principal" errors.
Terminal Output Screenshot(s)
This example uses a module that wraps the eks_blueprints module (module.platform). The module uses the following to invoke the eks_blueprints:
Console Output:
Additional context
This is helpful for any organizations implementing IAM self service and use the IAM role path as a guardrail to prevent privilege escalation.
The text was updated successfully, but these errors were encountered: