theonlymonica / multiple-app-single-lb-examples

1 stars 4 forks source link

Error: failed creating IAM Role (cluster1-alb-ingress): MalformedPolicyDocument: Federated principals must be valid domain names or SAML metadata ARNs #1

Closed yanncarlier closed 1 year ago

yanncarlier commented 1 year ago

I'm getting this error running from gitlab using a test domain name registered in cloudflare DNS.

╷ │ Error: failed creating IAM Role (cluster1-alb-ingress): MalformedPolicyDocument: Federated principals must be valid domain names or SAML metadata ARNs │ status code: 400, request id: 4973a55b-f191-47e8-a5db-136c7f010621 │ │ with module.load_balancer_controller.aws_iam_role.lb_controller[0], │ on .terraform/modules/load_balancer_controller/iam.tf line 361, in resource "aws_iam_role" "lb_controller": │ 361: resource "aws_iam_role" "lb_controller" { │ ╵ Releasing state lock. This may take a few moments... Cleaning up project directory and file based variables 00:04 ERROR: Job failed: exit code 1

what am I missing?

theonlymonica commented 1 year ago

Hello, since this is an "example" repository, it uses external modules. Specifically, for creating the load balancer and related resources, it uses an external module that contains the file at which you get your error: https://github.com/DNXLabs/terraform-aws-eks-lb-controller/blob/master/iam.tf

I have no idea what values you have assigned to your variables, but I can assume that the "malformed policy" error (at line 377 of the above file) is probably due to the _cluster_identity_oidcissuer variable that may have been referenced incorrectly.

I hope I was helpful to you.