File tree Expand file tree Collapse file tree 1 file changed +1
-28
lines changed
terraform/modules/environment Expand file tree Collapse file tree 1 file changed +1
-28
lines changed Original file line number Diff line number Diff line change @@ -17,36 +17,9 @@ module "vpc" {
1717 kubernetes_cluster_name = local. kubernetes_cluster_name
1818}
1919
20- # Data sources for EKS IAM
20+ # To get the current account id
2121data "aws_caller_identity" "current" {}
2222
23- # Use this role to limit access to the k8s admin serviceaccount
24- data "aws_iam_policy_document" "assumerole_root_policy" {
25- statement {
26- actions = [" sts:AssumeRole" ]
27-
28- principals {
29- type = " AWS"
30- identifiers = [" arn:aws:iam::${ data . aws_caller_identity . current . account_id } :root" ]
31- }
32- }
33-
34- # Allow the CI user to assume this role
35- statement {
36- actions = [" sts:AssumeRole" ]
37-
38- principals {
39- type = " AWS"
40- identifiers = [data . aws_iam_user . ci_user . arn ]
41- }
42- }
43- }
44-
45- resource "aws_iam_user_policy_attachment" "circleci_ecr_access" {
46- user = data. aws_iam_user . ci_user . user_name
47- policy_arn = " arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryPowerUser"
48- }
49-
5023#
5124# Provision the EKS cluster
5225module "eks" {
You can’t perform that action at this time.
0 commit comments