Skip to content

native-cube/terraform-aws-eks-fargate-profile

Repository files navigation

GitHub release (latest by date)

terraform-aws-eks-fargate-profile

Terraform module to configure an Fargate Profile on AWS EKS

Usage

module "eks-fargate-profile" {
  source  = "native-cube/eks-fargate-profile/aws"
  version = "~> 1.0.1"

  cluster_name = "eks-native-cube"
  subnet_ids   = ["subnet-037c37205ce1cd88c", "subnet-0bb4e7a5c3120bc47", "subnet-07a58a249f38a1f58"]

  namespace = "kube-system"
  labels = {
    infrastructure = "fargate"
  }

  tags = {
    Environment = "test"
  }
}

Examples

Requirements

Name Version
terraform >= 1.0.0
aws >= 3.38

Providers

Name Version
aws >= 3.38

Modules

No modules.

Resources

Name Type
aws_eks_fargate_profile.main resource
aws_iam_role.main resource
aws_iam_role_policy_attachment.main resource

Inputs

Name Description Type Default Required
cluster_name The name of the EKS cluster string n/a yes
description The description of the IAM Role used by fargate profile. string "EKS cluster fargate profile IAM role." no
fargate_profile_name Name of the EKS Fargate Profile. If not provided, profile will be called fargate-profile-namespace_name. string null no
labels Key-value mapping of Kubernetes labels for selection map(string) null no
namespace Kubernetes namespace for which fargate profile will be used. string n/a yes
subnet_ids Identifiers of private EC2 Subnets to associate with the EKS Fargate Profile. These subnets must have the following resource tag: kubernetes.io/cluster/cluster_name. list(string) n/a yes
tags Mapping of additional tags. map(string) {} no

Outputs

Name Description
eks_fargate_profile_arn ARN of the EKS Fargate Profile
eks_fargate_profile_id EKS Cluster name and EKS Fargate Profile name separated by a colon
eks_fargate_profile_role_arn ARN of the EKS Fargate Profile IAM role
eks_fargate_profile_role_name Name of the EKS Fargate Profile IAM role
eks_fargate_profile_status Status of the EKS Fargate Profile

License

See LICENSE for full details.

Pre-commit hooks

Install dependencies

MacOS

brew install pre-commit terraform-docs tflint

brew tap git-chglog/git-chglog
brew install git-chglog