sg, eks, iam 모듈추가
This commit is contained in:
14
modules/iam/eks-cluster.json.tftpl
Normal file
14
modules/iam/eks-cluster.json.tftpl
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"Version" : "2012-10-17",
|
||||
"Statement" : [
|
||||
{
|
||||
"Effect" : "Allow",
|
||||
"Principal" : {
|
||||
"Service" : [
|
||||
"eks.amazonaws.com"
|
||||
]
|
||||
},
|
||||
"Action" : "sts:AssumeRole"
|
||||
}
|
||||
]
|
||||
}
|
23
modules/iam/main.tf
Normal file
23
modules/iam/main.tf
Normal file
@ -0,0 +1,23 @@
|
||||
resource "aws_iam_role" "iam-role" {
|
||||
name = var.iam_name
|
||||
assume_role_policy = var.policy
|
||||
|
||||
tags = {
|
||||
tag-key = var.tag_name
|
||||
}
|
||||
}
|
||||
|
||||
# {
|
||||
# "Version" : "2012-10-17",
|
||||
# "Statement" : [
|
||||
# {
|
||||
# "Effect" : "Allow",
|
||||
# "Principal" : {
|
||||
# "Service" : [
|
||||
# "eks.amazonaws.com"
|
||||
# ]
|
||||
# },
|
||||
# "Action" : "sts:AssumeRole"
|
||||
# }
|
||||
# ]
|
||||
# }
|
4
modules/iam/outputs.tf
Normal file
4
modules/iam/outputs.tf
Normal file
@ -0,0 +1,4 @@
|
||||
output "iam_name" {
|
||||
value = aws_iam_role.iam-role.name
|
||||
|
||||
}
|
14
modules/iam/variables.tf
Normal file
14
modules/iam/variables.tf
Normal file
@ -0,0 +1,14 @@
|
||||
variable "iam_name" {
|
||||
description = "value"
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "policy" {
|
||||
description = "value"
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "tag_name" {
|
||||
description = "value"
|
||||
type = string
|
||||
}
|
Reference in New Issue
Block a user