Run compliance and security controls to detect Terraform AWS resources deviating from security best practices prior to deployment using Powerpipe and Steampipe.
Also, it should check the public_access_cidrs match none other than 0.0.0.0/0
public_access_cidrs - (Optional) List of CIDR blocks. Indicates which CIDR blocks can access the Amazon EKS public API server endpoint when enabled. EKS defaults this to a list with 0.0.0.0/0. Terraform will only perform drift detection of its value when present in a configuration.
vpc_config {
subnet_ids = [aws_subnet.named_test_resource1.id, aws_subnet.named_test_resource2.id]
endpoint_public_access = true ### (Optional) Whether the Amazon EKS public API server endpoint is enabled. Default is true
public_access_cidrs = ["0.0.0.0/0"] ### Accessible from internet
}
Steampipe version (steampipe -v)
Example: v0.3.0
Plugin version (steampipe plugin list)
Example: v0.5.0
To reproduce
Steps to reproduce the behavior (please include relevant code and/or commands).
Expected behavior
A clear and concise description of what you expected to happen.
Additional context
Add any other context about the problem here.
Describe the bug A clear and concise description of what the bug is.
The query > uses
endpoint_public_access
, which is moved tovpc_config
under terraform Resource: aws_eks_clusterAdditionally,
it's missing a null check if not provided; the default remains
**true**
[endpoint_public_access(https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eks_cluster#endpoint_public_access) - (Optional) Whether the Amazon EKS public API server endpoint is enabled. Default is trueAlso, it should check the
public_access_cidrs
match none other than 0.0.0.0/0public_access_cidrs - (Optional) List of CIDR blocks. Indicates which CIDR blocks can access the Amazon EKS public API server endpoint when enabled. EKS defaults this to a list with 0.0.0.0/0. Terraform will only perform drift detection of its value when present in a configuration.
Steampipe version (
steampipe -v
) Example: v0.3.0Plugin version (
steampipe plugin list
) Example: v0.5.0To reproduce Steps to reproduce the behavior (please include relevant code and/or commands).
Expected behavior A clear and concise description of what you expected to happen.
Additional context Add any other context about the problem here.