Skip to content

Commit

Permalink
cluster subnet_tag removal (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Sep 10, 2024
1 parent 2393acd commit b8550fe
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 27 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ Change logs are auto-generated with commitizen.
| Name | Type |
|------|------|
| [aws_ec2_tag.container_subnets](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ec2_tag) | resource |
| [aws_ec2_tag.lb_subnets](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ec2_tag) | resource |
| [aws_route53_vpc_association_authorization.self_zone](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_vpc_association_authorization) | resource |
| [aws_route53_vpc_association_authorization.self_zone_east](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_vpc_association_authorization) | resource |
| [aws_route53_zone.cluster_domain](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_zone) | resource |
Expand All @@ -125,7 +124,6 @@ Change logs are auto-generated with commitizen.
| [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source |
| [aws_subnet.subnets](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/subnet) | data source |
| [aws_subnets.container_subnets](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/subnets) | data source |
| [aws_subnets.lb_subnets](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/subnets) | data source |
| [aws_subnets.subnets](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/subnets) | data source |
| [aws_vpc.dummy_vpc](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/vpc) | data source |
| [aws_vpc.eks_vpc](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/vpc) | data source |
Expand All @@ -145,7 +143,6 @@ Change logs are auto-generated with commitizen.
| <a name="input_eks_ng_max_size"></a> [eks\_ng\_max\_size](#input\_eks\_ng\_max\_size) | Node Group maximum size | `number` | `15` | no |
| <a name="input_eks_ng_min_size"></a> [eks\_ng\_min\_size](#input\_eks\_ng\_min\_size) | Node Group minimum size | `number` | `4` | no |
| <a name="input_enable_cluster_creator_admin_permissions"></a> [enable\_cluster\_creator\_admin\_permissions](#input\_enable\_cluster\_creator\_admin\_permissions) | Indicates whether or not to add the cluster creator (the identity used by Terraform) as an administrator via access entry | `bool` | `false` | no |
| <a name="input_lb_subnets_name"></a> [lb\_subnets\_name](#input\_lb\_subnets\_name) | Define the name of the subnets to be used by this cluster | `string` | `"*-private-lb-*"` | no |
| <a name="input_os_username"></a> [os\_username](#input\_os\_username) | OS username from environment variable, ideally as $USER | `string` | `null` | no |
| <a name="input_profile"></a> [profile](#input\_profile) | AWS config profile | `string` | `""` | no |
| <a name="input_region"></a> [region](#input\_region) | AWS config region | `string` | `""` | no |
Expand Down
18 changes: 0 additions & 18 deletions dns_zones.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,8 @@ data "aws_subnets" "container_subnets" {
values = [data.aws_vpc.eks_vpc.id]
}
}
data "aws_subnets" "lb_subnets" {
filter {
name = "tag:Name"
values = [local.lb_subnets_name]
}
filter {
name = "vpc-id"
values = [data.aws_vpc.eks_vpc.id]
}
}
locals {
container_subnets_name = var.subnets_name
lb_subnets_name = var.lb_subnets_name
cluster_domain_name = format("%v.%v", var.cluster_name, var.vpc_domain_name)
cluster_domain_description = format("%v EKS Cluster DNS Zone", var.cluster_name)
zone_ids = compact(var.zone_ids)
Expand Down Expand Up @@ -163,13 +152,6 @@ resource "aws_ec2_tag" "container_subnets" {
value = "shared"
}

resource "aws_ec2_tag" "lb_subnets" {
for_each = toset(data.aws_subnets.lb_subnets.ids)
resource_id = each.value
key = "kubernetes.io/role/internal-nlb"
value = "1"
}

#### This is the correct way, it's commented because
#### the module is throwing an error on the for_each
#### in the module.
Expand Down
6 changes: 0 additions & 6 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ variable "subnets_name" {
default = "*-container-*"
}

variable "lb_subnets_name" {
description = "Define the name of the subnets to be used by this cluster"
type = string
default = "*-private-lb-*"
}

variable "vpc_domain_name" {
description = "The DNS domain name of the vpc the cluster is in."
type = string
Expand Down

0 comments on commit b8550fe

Please sign in to comment.