I am trying to create EKS cluster using Terraform - But it fails as the user I use doesn’t have permissions to create roles
Tutorial I am following: Provision an EKS cluster (AWS) | Terraform | HashiCorp Developer
Error that I am getting:
╷
│ Error: creating CloudWatch Logs Log Group (/aws/eks/education-eks-3PQKpqn0/cluster): operation error CloudWatch Logs: CreateLogGroup, https response error StatusCode: 400, RequestID: 83f18ad4-d41a-4366-99c9-90fc130e9c8b, ResourceAlreadyExistsException: The specified log group already exists
│
│ with module.eks.aws_cloudwatch_log_group.this[0],
│ on .terraform/modules/eks/main.tf line 120, in resource "aws_cloudwatch_log_group" "this":
│ 120: resource "aws_cloudwatch_log_group" "this" {
│
╵
╷
│ Error: creating IAM Role (education-eks-3PQKpqn0-cluster-20250126175352300400000001): adding inline policy (education-eks-3PQKpqn0-cluster): operation error IAM: PutRolePolicy, https response error StatusCode: 403, RequestID: a9cd5f10-5be2-4471-b548-6fb389e394d6, api error AccessDenied: User: arn:aws:iam::905418259536:user/kk_labs_user_421660 is not authorized to perform: iam:PutRolePolicy on resource: role education-eks-3PQKpqn0-cluster-20250126175352300400000001 because no identity-based policy allows the iam:PutRolePolicy action
│
│ with module.eks.aws_iam_role.this[0],
│ on .terraform/modules/eks/main.tf line 387, in resource "aws_iam_role" "this":
│ 387: resource "aws_iam_role" "this" {
│
╵
Could someone help, how to get the permissions to create roles or policies to the playgrouond user.
Thanks,
Suresh