18 lines
549 B
HCL
18 lines
549 B
HCL
resource "aws_iam_role" "self" {
|
|
assume_role_policy = data.aws_iam_policy_document.self_assume_role_policy.json
|
|
name = "EksCsiEbsRole-${var.eks_cluster_id}"
|
|
}
|
|
|
|
resource "aws_iam_role_policy_attachment" "self" {
|
|
policy_arn = "arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy"
|
|
role = aws_iam_role.self.name
|
|
}
|
|
|
|
resource "aws_eks_addon" "self" {
|
|
cluster_name = var.eks_cluster_id
|
|
addon_name = "aws-ebs-csi-driver"
|
|
addon_version = var.addon_version
|
|
|
|
service_account_role_arn = aws_iam_role.self.arn
|
|
}
|