51 lines
1.5 KiB
HCL
51 lines
1.5 KiB
HCL
include "root" {
|
|
path = find_in_parent_folders()
|
|
}
|
|
|
|
terraform {
|
|
source = "tfr:///terraform-aws-modules/eks/aws?version=18.8.1"
|
|
}
|
|
|
|
dependency "vpc" {
|
|
config_path = "../vpc"
|
|
|
|
mock_outputs_allowed_terraform_commands = ["validate", "plan"]
|
|
mock_outputs = {
|
|
vpc_id = "fake-vpc-id"
|
|
private_subnets = ["fake-private-subnet-id-1", "fake-sprivate-ubnet-id-2"]
|
|
}
|
|
}
|
|
|
|
locals {
|
|
config_vars = read_terragrunt_config(find_in_parent_folders("config.hcl"))
|
|
}
|
|
|
|
generate = local.config_vars.generate
|
|
|
|
inputs = {
|
|
cluster_name = local.config_vars.locals.eks_cluster_name
|
|
cluster_version = local.config_vars.locals.eks_cluster_version
|
|
|
|
vpc_id = dependency.vpc.outputs.vpc_id
|
|
subnet_ids = dependency.vpc.outputs.private_subnets
|
|
|
|
enable_irsa = local.config_vars.locals.enable_irsa
|
|
|
|
cluster_addons = local.config_vars.locals.cluster_addons
|
|
|
|
eks_managed_node_group_defaults = local.config_vars.locals.node_group_defaults
|
|
eks_managed_node_groups = local.config_vars.locals.node_groups
|
|
|
|
# Extend node-to-node security group rules
|
|
node_security_group_additional_rules = local.config_vars.locals.eks_node_security_group_additional_rules
|
|
cluster_security_group_additional_rules = local.config_vars.locals.eks_cluster_security_group_additional_rules
|
|
|
|
create_cloudwatch_log_group = false
|
|
|
|
tags = {
|
|
environment = local.config_vars.locals.environment
|
|
repository = local.config_vars.locals.repository
|
|
source = local.config_vars.locals.source
|
|
}
|
|
}
|