infracost: AWS Launch Template not detected when using terraform-aws-modules/eks/aws module
Example Terraform:
provider "aws" {
region = "us-east-1"
}
resource "aws_default_vpc" "default" {
}
data "aws_subnet_ids" "default" {
vpc_id = aws_default_vpc.default.id
}
module "my-cluster" {
source = "terraform-aws-modules/eks/aws"
cluster_name = "my-cluster"
cluster_version = "1.17"
subnets = data.aws_subnet_ids.default.ids
vpc_id = aws_default_vpc.default.id
worker_groups_launch_template = [
{
instance_type = "m4.large"
asg_desired_capacity = 5
},
]
}
Output is:
NAME MONTHLY QTY UNIT PRICE HOURLY COST MONTHLY COST
module.my-cluster-2.aws_autoscaling_group.workers_launch_template[0]
Total - -
module.my-cluster-2.aws_eks_cluster.this[0]
ββ EKS cluster 730 hours 0.1000 0.1000 73.0000
Total 0.1000 73.0000
OVERALL TOTAL (USD) 0.1000 73.0000
We expect that the aws_autoscaling_group.workers_launch_template[0]
resource has a launch template subresource with costs.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (12 by maintainers)
Merged π @akastav if you like, you can test it from the latest master branch. Assuming this repo is cloned and go is installed:
Thanks @akastav, Iβll dig into this a bit more and see if we can push a fix for this case.
Same thing , when using module.eks.aws_autoscaling_group.workers_launch_template shows 0
`
module βeksβ { source = βterraform-aws-modules/eks/awsβ version = β14.0.0β cluster_name = local.cluster_name cluster_version = β1.18β
worker_groups_launch_template = [ { name = βspot-groupβ override_instance_types = [βt3a.mediumβ, βt3.mediumβ, βt2.mediumβ]
It seems to work when using
worker_groups
instead ofworker_groups_launch_template
, e.g.:Shows: