mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-01-18 09:38:33 +01:00
feat: Add tags to EKS created cluster security group to match rest of module tagging scheme (#1957)
This commit is contained in:
@@ -829,6 +829,7 @@ Full contributing [guidelines are covered here](https://github.com/terraform-aws
|
|||||||
| Name | Type |
|
| Name | Type |
|
||||||
|------|------|
|
|------|------|
|
||||||
| [aws_cloudwatch_log_group.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_group) | resource |
|
| [aws_cloudwatch_log_group.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_group) | resource |
|
||||||
|
| [aws_ec2_tag.cluster_primary_security_group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ec2_tag) | resource |
|
||||||
| [aws_eks_addon.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eks_addon) | resource |
|
| [aws_eks_addon.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eks_addon) | resource |
|
||||||
| [aws_eks_cluster.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eks_cluster) | resource |
|
| [aws_eks_cluster.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eks_cluster) | resource |
|
||||||
| [aws_eks_identity_provider_config.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eks_identity_provider_config) | resource |
|
| [aws_eks_identity_provider_config.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eks_identity_provider_config) | resource |
|
||||||
|
|||||||
8
main.tf
8
main.tf
@@ -59,6 +59,14 @@ resource "aws_eks_cluster" "this" {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resource "aws_ec2_tag" "cluster_primary_security_group" {
|
||||||
|
for_each = { for k, v in merge(var.tags, var.cluster_tags) : k => v if var.create }
|
||||||
|
|
||||||
|
resource_id = aws_eks_cluster.this[0].vpc_config[0].cluster_security_group_id
|
||||||
|
key = each.key
|
||||||
|
value = each.value
|
||||||
|
}
|
||||||
|
|
||||||
resource "aws_cloudwatch_log_group" "this" {
|
resource "aws_cloudwatch_log_group" "this" {
|
||||||
count = local.create && var.create_cloudwatch_log_group ? 1 : 0
|
count = local.create && var.create_cloudwatch_log_group ? 1 : 0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user