mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-04-26 10:28:41 +02:00
feat: Ability to tag just EKS cluster (#1569)
This commit is contained in:
@@ -239,6 +239,7 @@ Apache 2 Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraf
|
|||||||
| <a name="input_cluster_name"></a> [cluster\_name](#input\_cluster\_name) | Name of the EKS cluster. Also used as a prefix in names of related resources. | `string` | n/a | yes |
|
| <a name="input_cluster_name"></a> [cluster\_name](#input\_cluster\_name) | Name of the EKS cluster. Also used as a prefix in names of related resources. | `string` | n/a | yes |
|
||||||
| <a name="input_cluster_security_group_id"></a> [cluster\_security\_group\_id](#input\_cluster\_security\_group\_id) | If provided, the EKS cluster will be attached to this security group. If not given, a security group will be created with necessary ingress/egress to work with the workers | `string` | `""` | no |
|
| <a name="input_cluster_security_group_id"></a> [cluster\_security\_group\_id](#input\_cluster\_security\_group\_id) | If provided, the EKS cluster will be attached to this security group. If not given, a security group will be created with necessary ingress/egress to work with the workers | `string` | `""` | no |
|
||||||
| <a name="input_cluster_service_ipv4_cidr"></a> [cluster\_service\_ipv4\_cidr](#input\_cluster\_service\_ipv4\_cidr) | service ipv4 cidr for the kubernetes cluster | `string` | `null` | no |
|
| <a name="input_cluster_service_ipv4_cidr"></a> [cluster\_service\_ipv4\_cidr](#input\_cluster\_service\_ipv4\_cidr) | service ipv4 cidr for the kubernetes cluster | `string` | `null` | no |
|
||||||
|
| <a name="input_cluster_tags"></a> [cluster\_tags](#input\_cluster\_tags) | A map of tags to add to just the eks resource. | `map(string)` | `{}` | no |
|
||||||
| <a name="input_cluster_version"></a> [cluster\_version](#input\_cluster\_version) | Kubernetes version to use for the EKS cluster. | `string` | n/a | yes |
|
| <a name="input_cluster_version"></a> [cluster\_version](#input\_cluster\_version) | Kubernetes version to use for the EKS cluster. | `string` | n/a | yes |
|
||||||
| <a name="input_create_eks"></a> [create\_eks](#input\_create\_eks) | Controls if EKS resources should be created (it affects almost all resources) | `bool` | `true` | no |
|
| <a name="input_create_eks"></a> [create\_eks](#input\_create\_eks) | Controls if EKS resources should be created (it affects almost all resources) | `bool` | `true` | no |
|
||||||
| <a name="input_create_fargate_pod_execution_role"></a> [create\_fargate\_pod\_execution\_role](#input\_create\_fargate\_pod\_execution\_role) | Controls if the EKS Fargate pod execution IAM role should be created. | `bool` | `true` | no |
|
| <a name="input_create_fargate_pod_execution_role"></a> [create\_fargate\_pod\_execution\_role](#input\_create\_fargate\_pod\_execution\_role) | Controls if the EKS Fargate pod execution IAM role should be created. | `bool` | `true` | no |
|
||||||
|
|||||||
@@ -12,7 +12,10 @@ resource "aws_eks_cluster" "this" {
|
|||||||
enabled_cluster_log_types = var.cluster_enabled_log_types
|
enabled_cluster_log_types = var.cluster_enabled_log_types
|
||||||
role_arn = local.cluster_iam_role_arn
|
role_arn = local.cluster_iam_role_arn
|
||||||
version = var.cluster_version
|
version = var.cluster_version
|
||||||
tags = var.tags
|
tags = merge(
|
||||||
|
var.tags,
|
||||||
|
var.cluster_tags,
|
||||||
|
)
|
||||||
|
|
||||||
vpc_config {
|
vpc_config {
|
||||||
security_group_ids = compact([local.cluster_security_group_id])
|
security_group_ids = compact([local.cluster_security_group_id])
|
||||||
|
|||||||
@@ -98,6 +98,12 @@ variable "tags" {
|
|||||||
default = {}
|
default = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "cluster_tags" {
|
||||||
|
description = "A map of tags to add to just the eks resource."
|
||||||
|
type = map(string)
|
||||||
|
default = {}
|
||||||
|
}
|
||||||
|
|
||||||
variable "vpc_id" {
|
variable "vpc_id" {
|
||||||
description = "VPC where the cluster and workers will be deployed."
|
description = "VPC where the cluster and workers will be deployed."
|
||||||
type = string
|
type = string
|
||||||
|
|||||||
Reference in New Issue
Block a user