Created
October 19, 2022 19:56
-
-
Save jbouse/7432021ceb9a2bcec9cb3420e690f9b0 to your computer and use it in GitHub Desktop.
AWS EKS Cluster Security Group ID lookup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data "aws_security_group" "eks_cluster" { | |
tags = { | |
"aws:eks:cluster-name" = var.eks_cluster_name | |
} | |
} | |
output "eks_cluster_security_group_id" { | |
value = data.aws_security_group.eks_cluster.id | |
description = "EKS Cluster Security Group ID" | |
} | |
variable "eks_cluster_name" { | |
type = string | |
description = "EKS cluster name" | |
} | |
terraform { | |
required_version = ">= 1.1" | |
required_providers { | |
aws = { | |
source = "hashicorp/aws" | |
version = ">= 3.0" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment