Title
#general
g

Gurpal Singh

09/09/2022, 7:26 PM
should
infracost
detect the difference between spot and on-demand?
~ 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
^
Tim (Infracost)

Tim (Infracost)

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

Gurpal Singh

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
7:56 PM
4.30.0 aws provider eks version 1.22
Tim (Infracost)

Tim (Infracost)

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.
g

Gurpal Singh

09/09/2022, 8:29 PM
i have 👍 the issue
8:30 PM
@Tim (Infracost) 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!
8:30 PM
hope you have a good weekend.
Tim (Infracost)

Tim (Infracost)

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