mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-01-15 08:14:12 +01:00
42 lines
710 B
HCL
42 lines
710 B
HCL
data "aws_region" "current" {}
|
|
|
|
data "aws_ami" "eks_worker" {
|
|
filter {
|
|
name = "name"
|
|
values = ["eks-worker-*"]
|
|
}
|
|
|
|
most_recent = true
|
|
owners = ["602401143452"] # Amazon
|
|
}
|
|
|
|
data "aws_iam_policy_document" "workers_assume_role_policy" {
|
|
statement {
|
|
sid = "EKSWorkerAssumeRole"
|
|
|
|
actions = [
|
|
"sts:AssumeRole",
|
|
]
|
|
|
|
principals {
|
|
type = "Service"
|
|
identifiers = ["ec2.amazonaws.com"]
|
|
}
|
|
}
|
|
}
|
|
|
|
data "aws_iam_policy_document" "cluster_assume_role_policy" {
|
|
statement {
|
|
sid = "EKSClusterAssumeRole"
|
|
|
|
actions = [
|
|
"sts:AssumeRole",
|
|
]
|
|
|
|
principals {
|
|
type = "Service"
|
|
identifiers = ["eks.amazonaws.com"]
|
|
}
|
|
}
|
|
}
|