Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tf_mod_aws_eks_cluster
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
steamhaus
tf_mod_aws_eks_cluster
Commits
6fd8fbb5
Commit
6fd8fbb5
authored
Jun 22, 2018
by
Chris Merrett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added group role assumption permissions and attached
parent
5692bf8d
Pipeline
#4982
passed with stage
in 16 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
cluster.tf
cluster.tf
+10
-0
data.tf
data.tf
+8
-2
No files found.
cluster.tf
View file @
6fd8fbb5
...
...
@@ -65,3 +65,13 @@ resource "aws_iam_role" "admin" {
resource
"aws_iam_group"
"admin"
{
name
=
"
${
var
.
cluster_name
}
-eks-kubernetes-admin"
}
resource
"aws_iam_policy"
"admin_assumerole"
{
name
=
"
${
var
.
cluster_name
}
-eks-kubernetes-admin-assumerole"
policy
=
"
${data
.
aws_iam_policy_document
.
admin_assumerole
.
json
}
"
}
resource
"aws_iam_group_policy_attachment"
"admin_assumerole"
{
group
=
"
${
aws_iam_group
.
admin
.
name
}
"
policy_arn
=
"
${
aws_iam_policy
.
admin_assumerole
.
arn
}
"
}
data.tf
View file @
6fd8fbb5
...
...
@@ -55,13 +55,19 @@ data "aws_iam_policy_document" "admin" {
identifiers
=
[
"arn:aws:iam::
${data
.
aws_caller_identity
.
current
.
account_id
}
:root"
,
"arn:aws:iam::
${data
.
aws_caller_identity
.
current
.
account_id
}
:group/
${
var
.
cluster_name
}
-eks-kubernetes-admin"
,
"arn:aws:iam::
${data
.
aws_caller_identity
.
current
.
account_id
}
:role/Steamhaus"
,
]
}
}
}
data
"aws_iam_policy_document"
"admin_assumerole"
{
statement
{
effect
=
"Allow"
actions
=
[
"sts:AssumeRole"
]
resources
=
[
"arn:aws:iam::
${data
.
aws_caller_identity
.
current
.
account_id
}
:role/
${
var
.
cluster_name
}
-eks-kubernetes-admin"
]
}
}
data
"template_file"
"kubeconfig"
{
template
=
"
${
file
(
"
${
path
.
module}
/templates/kubeconfig.tpl"
)
}
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment