This module sets up an EKS cluster on AWS. It wraps the official (terraform-aws-eks)[https://github.com/terraform-aws-modules/terraform-aws-eks] module with sane defaults for it's application.
For Terraform v0.12.0+
module "network" {
source = "github.com/insight-w3f/terraform-polkadot-aws-network.git?ref=master"
all_enabled = true
num_azs = 3
cluster_name = random_pet.this.id
}
module "eks" {
source = "../.."
cluster_name = random_pet.this.id
security_group_id = module.network.k8s_security_group_id
subnet_ids = slice(module.network.public_subnets, 0, 3)
vpc_id = module.network.vpc_id
}
No issue is creating limit on this module.
No requirements.
Name | Version |
---|---|
aws | n/a |
helm | n/a |
template | n/a |
Name | Description | Type | Default | Required |
---|---|---|---|---|
cluster_autoscale | Do you want the cluster's worker pool to autoscale? | bool |
false |
no |
cluster_autoscale_max_workers | Maximum number of workers in worker pool | number |
1 |
no |
cluster_autoscale_min_workers | Minimum number of workers in worker pool | number |
1 |
no |
create | Bool for creation | bool |
true |
no |
environment | The environment | string |
"test" |
no |
namespace | The namespace to deploy into | string |
"polkadot" |
no |
network_name | The network name, ie kusama / mainnet | string |
"kusama" |
no |
num_workers | Number of workers for worker pool | number |
1 |
no |
owner | Owner of the infrastructure | string |
"insight" |
no |
security_group_id | security group id for workers | string |
n/a | yes |
spot_autoscale | Bool to enable the use of autoscaler in spot pool | bool |
false |
no |
spot_cluster_max_workers | Maximum number of workers in SPOT pool | number |
10 |
no |
spot_cluster_min_workers | Minimum number of workers in SPOT pool | number |
0 |
no |
spot_num_workers | Number of workers in SPOT pool when autoscaling disabled | number |
1 |
no |
stage | The stage of the deployment | string |
"test" |
no |
subnet_ids | The id of the subnet. | list(string) |
n/a | yes |
use_spot_instances | Bool to enable use of spot instances as well as on-demand | bool |
false |
no |
vpc_id | The vpc id | string |
n/a | yes |
worker_additional_security_group_ids | List of security group ids for workers | list(string) |
[] |
no |
worker_instance_type | The instance class for workers | string |
"r5.large" |
no |
Name | Description |
---|---|
cloudwatch_log_group_name | Name of cloudwatch log group created |
cluster_arn | The Amazon Resource Name (ARN) of the cluster. |
cluster_certificate_authority_data | Nested attribute containing certificate-authority-data for your cluster. This is the base64 encoded certificate data required to communicate with your cluster. |
cluster_endpoint | The endpoint for your EKS Kubernetes API. |
cluster_iam_role_arn | IAM role ARN of the EKS cluster. |
cluster_iam_role_name | IAM role name of the EKS cluster. |
cluster_id | The name/id of the EKS cluster. |
cluster_oidc_issuer_url | The URL on the EKS cluster OIDC Issuer |
cluster_security_group_id | Security group ID attached to the EKS cluster. |
cluster_version | The Kubernetes server version for the EKS cluster. |
config_map_aws_auth | A kubernetes configuration to authenticate to this EKS cluster. |
kubeconfig | kubectl config file contents for this EKS cluster. |
kubeconfig_filename | The filename of the generated kubectl config. |
node_groups | Outputs from EKS node groups. Map of maps, keyed by var.node_groups keys |
oidc_provider_arn | The ARN of the OIDC Provider if enable_irsa = true . |
worker_iam_instance_profile_arns | default IAM instance profile ARN for EKS worker groups |
worker_iam_instance_profile_names | default IAM instance profile name for EKS worker groups |
worker_iam_role_arn | default IAM role ARN for EKS worker groups |
worker_iam_role_name | default IAM role name for EKS worker groups |
worker_security_group_id | Security group ID attached to the EKS workers. |
workers_asg_arns | IDs of the autoscaling groups containing workers. |
workers_asg_names | Names of the autoscaling groups containing workers. |
workers_default_ami_id | ID of the default worker group AMI |
workers_launch_template_arns | ARNs of the worker launch templates. |
workers_launch_template_ids | IDs of the worker launch templates. |
workers_launch_template_latest_versions | Latest versions of the worker launch templates. |
workers_user_data | User data of worker groups |
This module has been packaged with terratest tests
To run them:
- Install Go
- Run
make test-init
from the root of this repo - Run
make test
again from root
Module managed by insight-w3f
Apache 2 Licensed. See LICENSE for full details.