mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-03-24 18:31:09 +01:00
feat: Added ability to pass different subnets for fargate and the cluster (#1527)
This commit is contained in:
@@ -247,6 +247,7 @@ Apache 2 Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraf
|
|||||||
| <a name="input_enable_irsa"></a> [enable\_irsa](#input\_enable\_irsa) | Whether to create OpenID Connect Provider for EKS to enable IRSA | `bool` | `false` | no |
|
| <a name="input_enable_irsa"></a> [enable\_irsa](#input\_enable\_irsa) | Whether to create OpenID Connect Provider for EKS to enable IRSA | `bool` | `false` | no |
|
||||||
| <a name="input_fargate_pod_execution_role_name"></a> [fargate\_pod\_execution\_role\_name](#input\_fargate\_pod\_execution\_role\_name) | The IAM Role that provides permissions for the EKS Fargate Profile. | `string` | `null` | no |
|
| <a name="input_fargate_pod_execution_role_name"></a> [fargate\_pod\_execution\_role\_name](#input\_fargate\_pod\_execution\_role\_name) | The IAM Role that provides permissions for the EKS Fargate Profile. | `string` | `null` | no |
|
||||||
| <a name="input_fargate_profiles"></a> [fargate\_profiles](#input\_fargate\_profiles) | Fargate profiles to create. See `fargate_profile` keys section in fargate submodule's README.md for more details | `any` | `{}` | no |
|
| <a name="input_fargate_profiles"></a> [fargate\_profiles](#input\_fargate\_profiles) | Fargate profiles to create. See `fargate_profile` keys section in fargate submodule's README.md for more details | `any` | `{}` | no |
|
||||||
|
| <a name="input_fargate_subnets"></a> [fargate\_subnets](#input\_fargate\_subnets) | A list of subnets to place fargate workers within (if different from subnets). | `list(string)` | `[]` | no |
|
||||||
| <a name="input_iam_path"></a> [iam\_path](#input\_iam\_path) | If provided, all IAM roles will be created on this path. | `string` | `"/"` | no |
|
| <a name="input_iam_path"></a> [iam\_path](#input\_iam\_path) | If provided, all IAM roles will be created on this path. | `string` | `"/"` | no |
|
||||||
| <a name="input_kubeconfig_aws_authenticator_additional_args"></a> [kubeconfig\_aws\_authenticator\_additional\_args](#input\_kubeconfig\_aws\_authenticator\_additional\_args) | Any additional arguments to pass to the authenticator such as the role to assume. e.g. ["-r", "MyEksRole"]. | `list(string)` | `[]` | no |
|
| <a name="input_kubeconfig_aws_authenticator_additional_args"></a> [kubeconfig\_aws\_authenticator\_additional\_args](#input\_kubeconfig\_aws\_authenticator\_additional\_args) | Any additional arguments to pass to the authenticator such as the role to assume. e.g. ["-r", "MyEksRole"]. | `list(string)` | `[]` | no |
|
||||||
| <a name="input_kubeconfig_aws_authenticator_command"></a> [kubeconfig\_aws\_authenticator\_command](#input\_kubeconfig\_aws\_authenticator\_command) | Command to use to fetch AWS EKS credentials. | `string` | `"aws-iam-authenticator"` | no |
|
| <a name="input_kubeconfig_aws_authenticator_command"></a> [kubeconfig\_aws\_authenticator\_command](#input\_kubeconfig\_aws\_authenticator\_command) | Command to use to fetch AWS EKS credentials. | `string` | `"aws-iam-authenticator"` | no |
|
||||||
|
|||||||
@@ -61,7 +61,8 @@ module "eks" {
|
|||||||
source = "../.."
|
source = "../.."
|
||||||
cluster_name = local.cluster_name
|
cluster_name = local.cluster_name
|
||||||
cluster_version = "1.20"
|
cluster_version = "1.20"
|
||||||
subnets = module.vpc.private_subnets
|
subnets = [module.vpc.private_subnets[0], module.vpc.public_subnets[1]]
|
||||||
|
fargate_subnets = [module.vpc.private_subnets[2]]
|
||||||
|
|
||||||
tags = {
|
tags = {
|
||||||
Environment = "test"
|
Environment = "test"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ module "fargate" {
|
|||||||
permissions_boundary = var.permissions_boundary
|
permissions_boundary = var.permissions_boundary
|
||||||
iam_path = var.iam_path
|
iam_path = var.iam_path
|
||||||
iam_policy_arn_prefix = local.policy_arn_prefix
|
iam_policy_arn_prefix = local.policy_arn_prefix
|
||||||
subnets = var.subnets
|
subnets = coalescelist(var.fargate_subnets, var.subnets)
|
||||||
tags = var.tags
|
tags = var.tags
|
||||||
|
|
||||||
# Hack to ensure ordering of resource creation.
|
# Hack to ensure ordering of resource creation.
|
||||||
|
|||||||
@@ -87,6 +87,12 @@ variable "map_users" {
|
|||||||
default = []
|
default = []
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "fargate_subnets" {
|
||||||
|
description = "A list of subnets to place fargate workers within (if different from subnets)."
|
||||||
|
type = list(string)
|
||||||
|
default = []
|
||||||
|
}
|
||||||
|
|
||||||
variable "subnets" {
|
variable "subnets" {
|
||||||
description = "A list of subnets to place the EKS cluster and workers within."
|
description = "A list of subnets to place the EKS cluster and workers within."
|
||||||
type = list(string)
|
type = list(string)
|
||||||
|
|||||||
Reference in New Issue
Block a user