• Terraform: aws_security_groups empty list of SecurityGroups

    2 min read

    terraform provider AWS aws_security_groups

    Update 10/02/2020: The new version 4.0 of the AWS provider have been released. At this point, all AWS provider plural data sources (like the aws_security_groups) that return an array of results will now return an empty list if zero results are found.

    Prior to that, if when trying to use the aws_security_groups data source if the tags did not match any SecurityGroup, terraform would have returned an error instead of an empty list:

    data "aws_security_groups" "eks-pod" {
      tags = {
         "NotAnActualTag" = "WontMatchAnything"



From pet to cattle
Treat your kubernetes clusters like cattle, not pets