Skip to content

Commit

Permalink
Added support for tagging and versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
dunefro committed Sep 21, 2023
1 parent 2b405c2 commit 169f231
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions efs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ resource "aws_iam_policy" "efs" {
name_prefix = "${var.cluster_name}-access-to-efs"
description = "EFS Access policy for cluster"
policy = data.aws_iam_policy_document.efs.json
tags = local.tags
}
# https://github.com/kubernetes-sigs/aws-efs-csi-driver/blob/master/docs/iam-policy-example.json
data "aws_iam_policy_document" "efs" {
Expand Down
6 changes: 1 addition & 5 deletions iam-sa.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
# From https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/examples/irsa/irsa.tf

data "aws_eks_cluster" "cluster" {
name = var.cluster_name
}

module "iam_assumable_role_admin" {
source = "terraform-aws-modules/iam/aws//modules/iam-assumable-role-with-oidc"
version = "5.27.0"
Expand All @@ -18,4 +13,5 @@ module "iam_assumable_role_admin" {
role_policy_arns = [
aws_iam_policy.efs.arn
]
tags = local.tags
}
5 changes: 0 additions & 5 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,4 @@ variable "tags" {
type = map(string)
default = {}
description = "AWS Tags common to all the resources created"
}

variable "account_name" {
description = "AWS Account Name"
type = string
}
9 changes: 9 additions & 0 deletions versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
terraform {
required_version = ">= 1.4"
required_providers {
aws = {
source = "hashicorp/aws"
version = "5.17.0"
}
}
}

0 comments on commit 169f231

Please sign in to comment.