https://infracost.io logo
#general
Title
# general
w

worried-soccer-67640

09/09/2022, 7:26 PM
should
infracost
detect the difference between spot and on-demand?
Copy code
~ aws_eks_node_group.nodegroup["spot-az1"]
  -$1,023 ($1,137 → $114)

    ~ aws_launch_template.nodegroup
    
        ~ Instance usage (Linux/UNIX, on-demand, m5.2xlarge → t3a.xlarge)
          -$1,011 ($1,121 → $110)
    
        ~ block_device_mapping[0]
        
            ~ Storage (general purpose SSD, gp3)
              -$12.00 ($16.00 → $4.00
this is definitely a spot node group, but it says
on-demand
^
c

crooked-daybreak-55253

09/09/2022, 7:38 PM
It looks like it should if you have
Copy code
instance_market_options {
    market_type = "spot"
  }
defined in the launch_template
w

worried-soccer-67640

09/09/2022, 7:54 PM
we don't do that. we use
capacity_type
in the
aws_eks_node_group
resource. https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eks_node_group#capacity_type
4.30.0 aws provider eks version 1.22
c

crooked-daybreak-55253

09/09/2022, 8:08 PM
Hmm yeah our code is ignoring capacity type when a launch template is present. It looks like Alistair submitted a bug for something similar earlier today.
w

worried-soccer-67640

09/09/2022, 8:29 PM
i have 👍 the issue
@crooked-daybreak-55253 thanks for all your help this week. much appreciated. i've got everything up and running with the self host cloud pricing api, and atlantis!
hope you have a good weekend.
c

crooked-daybreak-55253

09/10/2022, 12:40 AM
Awesome, glad you got it working.