eks-iam-role

cloudposse/eks-iam-role/aws

Terraform Module HCL AWS

Terraform module to provision an EKS IAM Role for Service Account

Install
module "eks-iam-role" {
source = "cloudposse/eks-iam-role/aws"
version = "2.2.1"
}
plain text: /constructs/tfmod-cloudposse-eks-iam-role-aws/install.txt
⭐ Source on GitHub 📦 Registry page
README

This terraform-aws-eks-iam-role project provides a simplified mechanism for provisioning AWS EKS Service Account IAM roles. > [!TIP] > #### 👽 Use Atmos with Terraform > Cloud Posse uses atmos to easily orchestrate multiple environments using Terraform. > Works with Github Actions, Atlantis, or Spacelift. > > > Watch demo of using Atmos with Terraform > > Example of running atmos to manage infrastructure from our Quick Start tutorial. > Usage Here's how to invoke this module in your projects ``hcl module "eks_iam_role" { source = "cloudposse/eks-iam-role/aws" # Cloud Posse recommends pinning every module to a specific version # version = "x.x.x" namespace = var.namespace environment = var.environment stage = var.stage name = var.name delimiter = var.delimiter attributes = var.attributes tag

Inputs (27)
NameTypeDescriptionDefault
eks_cluster_oidc_issuer_urlstringOIDC issuer URL for the EKS cluster (initial "https://" may be omitted) required
namespacestringID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp'null
stagestringID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'bunull
tagsmap(string)Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`). Neither the tag keys nor the t{}
label_orderlist(string)The order in which the labels (ID elements) appear in the `id`. Defaults to ["nanull
managed_policy_arnsset(string)List of managed policies to attach to created role[]
contextanySingle object for setting entire context at once. See description of individual { "additional_tag_map": {}, "attribu
delimiterstringDelimiter to be used between ID elements. Defaults to `-` (hyphen). Set to `""` null
labels_as_tagsset(string)Set of labels (ID elements) to include as tags in the `tags` output. Default is [ "default" ]
service_account_namestringKubernetes ServiceAccount name. Leave empty or set to "*" to indicate all Servicnull
service_account_namespacestringKubernetes Namespace where service account is deployed. Leave empty or set to "*null
aws_account_numberstringAWS account number of EKS cluster owner. If an AWS account number is not providenull
enabledboolSet to false to prevent the module from creating any resourcesnull
environmentstringID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'stnull
attributeslist(string)ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`, []
additional_tag_mapmap(string)Additional key-value pairs to add to each map in `tags_as_list_of_maps`. Not add{}
aws_iam_policy_documentanyJSON string representation of the IAM policy for this service account as list of[]
label_key_casestringControls the letter case of the `tags` keys (label names) for tags generated by null
id_length_limitnumberLimit `id` to this many characters (minimum 6). Set to `0` for unlimited length.null
aws_partitionstringAWS partition: 'aws', 'aws-cn', or 'aws-us-gov'"aws"
permissions_boundarystringARN of the policy that is used to set the permissions boundary for the role.null
Outputs (8)
service_account_policy_arn — IAM policy ARN
service_account_namespace — Kubernetes Service Account namespace
service_account_name — Kubernetes Service Account name
service_account_role_name — IAM role name
service_account_role_unique_id — IAM role unique ID
service_account_role_arn — IAM role ARN
service_account_policy_name — IAM policy name
service_account_policy_id — IAM policy ID
Resources (3)
aws_iam_policyaws_iam_roleaws_iam_role_policy_attachment
Details
FrameworkTerraform Module
LanguageHCL
Version2.2.1
Cloud AWS
★ Stars31
Forks23
Total downloads6.0M
Inputs27
Outputs8
Resources3
Examples1
LicenseApache-2.0
Namespacecloudposse
Updated