diff --git a/efs.tf b/efs.tf index 77e6881..602a61a 100644 --- a/efs.tf +++ b/efs.tf @@ -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" { diff --git a/iam-sa.tf b/iam-sa.tf index 897732b..3f875bb 100644 --- a/iam-sa.tf +++ b/iam-sa.tf @@ -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" @@ -18,4 +13,5 @@ module "iam_assumable_role_admin" { role_policy_arns = [ aws_iam_policy.efs.arn ] + tags = local.tags } \ No newline at end of file diff --git a/variables.tf b/variables.tf index 770cc88..8e0153d 100644 --- a/variables.tf +++ b/variables.tf @@ -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 } \ No newline at end of file diff --git a/versions.tf b/versions.tf new file mode 100644 index 0000000..2de879c --- /dev/null +++ b/versions.tf @@ -0,0 +1,9 @@ +terraform { + required_version = ">= 1.4" + required_providers { + aws = { + source = "hashicorp/aws" + version = "5.17.0" + } + } +} \ No newline at end of file