diff --git a/internal/providers/terraform/ibm/testdata/is_instance_test/is_instance_test.golden b/internal/providers/terraform/ibm/testdata/is_instance_test/is_instance_test.golden index ca3bc797dd3..edb1dbea7d6 100644 --- a/internal/providers/terraform/ibm/testdata/is_instance_test/is_instance_test.golden +++ b/internal/providers/terraform/ibm/testdata/is_instance_test/is_instance_test.golden @@ -1,30 +1,258 @@ - Name Monthly Qty Unit Monthly Cost - - ibm_is_instance.vsi - ├─ Instance Hours (cx2-2x4) 730 Hours $64.97 - └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 - - ibm_is_instance.vsi_boot_volume - ├─ Instance Hours (cx2-2x4) 730 Hours $64.97 - └─ Boot volume (boot-volume-label, 250 GB) 182,500 Hours $20.98 - - ibm_is_instance.vsi_dedicated_host - ├─ Instance Hours (cx2-2x4) 730 Hours $64.97 - └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 - - ibm_is_vpc.vpc - ├─ VPC instance 1 Instance $0.00 - ├─ VPC egress free allowance (first 5GB) Monthly cost depends on usage: $0.00 per GB - └─ VPC egress us-south (first 9995 GB) Monthly cost depends on usage: $0.090915 per GB - └─ VPC egress us-south (next 40000 GB) Monthly cost depends on usage: $0.086735 per GB - └─ VPC egress us-south (next 100000 GB) Monthly cost depends on usage: $0.07315 per GB - └─ VPC egress us-south (over 149995 GB) Monthly cost depends on usage: $0.05225 per GB - - OVERALL TOTAL $232.67 + Name Monthly Qty Unit Monthly Cost + + ibm_is_instance.vsi["bx2-128x512"] + ├─ Instance Hours (bx2-128x512) 730 Hours $4,688.06 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi["bx2a-128x512"] + ├─ Instance Hours (bx2a-128x512) 730 Hours $4,688.06 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi["bx2d-128x512"] + ├─ Instance Hours (bx2d-128x512) 730 Hours $5,089.56 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi["bx3d-128x640"] + ├─ Instance Hours (bx3d-128x640) 730 Hours $5,242.13 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi["bx3dc-16x80"] + ├─ Instance Hours (bx3dc-16x80) 730 Hours $655.54 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi["cx2-128x256"] + ├─ Instance Hours (cx2-128x256) 730 Hours $4,150.78 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi["cx2-2x4"] + ├─ Instance Hours (cx2-2x4) 730 Hours $64.97 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi["cx2d-128x256"] + ├─ Instance Hours (cx2d-128x256) 730 Hours $4,552.28 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi["cx3d-128x320"] + ├─ Instance Hours (cx3d-128x320) 730 Hours $4,688.79 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi["cx3dc-128x320"] + ├─ Instance Hours (cx3dc-128x320) 730 Hours $4,688.79 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi["gx2-16x128x1v100"] + ├─ Instance Hours (gx2-16x128x1v100) 730 Hours $2,283.44 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi["gx3-16x80x1l4"] + ├─ Instance Hours (gx3-16x80x1l4) 730 Hours $1,124.20 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi["gx3d-160x1792x8h100"] + ├─ Instance Hours (gx3d-160x1792x8h100) 730 Hours $69,350.00 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi["mx2-128x1024"] + ├─ Instance Hours (mx2-128x1024) 730 Hours $6,063.38 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi["mx2-8x64"] + ├─ Instance Hours (mx2-8x64) 730 Hours $378.87 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi["mx2d-128x1024"] + ├─ Instance Hours (mx2d-128x1024) 730 Hours $6,464.88 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi["mx3d-128x1280"] + ├─ Instance Hours (mx3d-128x1280) 730 Hours $6,659.06 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi["ox2-128x1024"] + ├─ Instance Hours (ox2-128x1024) 730 Hours $8,070.15 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi["ux2d-100x2800"] + ├─ Instance Hours (ux2d-100x2800) 730 Hours $14,656.94 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi["vx2d-144x2016"] + ├─ Instance Hours (vx2d-144x2016) 730 Hours $11,359.53 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi_boot_volume["bx2-128x512"] + ├─ Instance Hours (bx2-128x512) 730 Hours $4,688.06 + └─ Boot volume (boot-volume-label, 250 GB) 182,500 Hours $20.98 + + ibm_is_instance.vsi_boot_volume["bx2a-128x512"] + ├─ Instance Hours (bx2a-128x512) 730 Hours $4,688.06 + └─ Boot volume (boot-volume-label, 250 GB) 182,500 Hours $20.98 + + ibm_is_instance.vsi_boot_volume["bx2d-128x512"] + ├─ Instance Hours (bx2d-128x512) 730 Hours $5,089.56 + └─ Boot volume (boot-volume-label, 250 GB) 182,500 Hours $20.98 + + ibm_is_instance.vsi_boot_volume["bx3d-128x640"] + ├─ Instance Hours (bx3d-128x640) 730 Hours $5,242.13 + └─ Boot volume (boot-volume-label, 250 GB) 182,500 Hours $20.98 + + ibm_is_instance.vsi_boot_volume["bx3dc-16x80"] + ├─ Instance Hours (bx3dc-16x80) 730 Hours $655.54 + └─ Boot volume (boot-volume-label, 250 GB) 182,500 Hours $20.98 + + ibm_is_instance.vsi_boot_volume["cx2-128x256"] + ├─ Instance Hours (cx2-128x256) 730 Hours $4,150.78 + └─ Boot volume (boot-volume-label, 250 GB) 182,500 Hours $20.98 + + ibm_is_instance.vsi_boot_volume["cx2-2x4"] + ├─ Instance Hours (cx2-2x4) 730 Hours $64.97 + └─ Boot volume (boot-volume-label, 250 GB) 182,500 Hours $20.98 + + ibm_is_instance.vsi_boot_volume["cx2d-128x256"] + ├─ Instance Hours (cx2d-128x256) 730 Hours $4,552.28 + └─ Boot volume (boot-volume-label, 250 GB) 182,500 Hours $20.98 + + ibm_is_instance.vsi_boot_volume["cx3d-128x320"] + ├─ Instance Hours (cx3d-128x320) 730 Hours $4,688.79 + └─ Boot volume (boot-volume-label, 250 GB) 182,500 Hours $20.98 + + ibm_is_instance.vsi_boot_volume["cx3dc-128x320"] + ├─ Instance Hours (cx3dc-128x320) 730 Hours $4,688.79 + └─ Boot volume (boot-volume-label, 250 GB) 182,500 Hours $20.98 + + ibm_is_instance.vsi_boot_volume["gx2-16x128x1v100"] + ├─ Instance Hours (gx2-16x128x1v100) 730 Hours $2,283.44 + └─ Boot volume (boot-volume-label, 250 GB) 182,500 Hours $20.98 + + ibm_is_instance.vsi_boot_volume["gx3-16x80x1l4"] + ├─ Instance Hours (gx3-16x80x1l4) 730 Hours $1,124.20 + └─ Boot volume (boot-volume-label, 250 GB) 182,500 Hours $20.98 + + ibm_is_instance.vsi_boot_volume["gx3d-160x1792x8h100"] + ├─ Instance Hours (gx3d-160x1792x8h100) 730 Hours $69,350.00 + └─ Boot volume (boot-volume-label, 250 GB) 182,500 Hours $20.98 + + ibm_is_instance.vsi_boot_volume["mx2-128x1024"] + ├─ Instance Hours (mx2-128x1024) 730 Hours $6,063.38 + └─ Boot volume (boot-volume-label, 250 GB) 182,500 Hours $20.98 + + ibm_is_instance.vsi_boot_volume["mx2-8x64"] + ├─ Instance Hours (mx2-8x64) 730 Hours $378.87 + └─ Boot volume (boot-volume-label, 250 GB) 182,500 Hours $20.98 + + ibm_is_instance.vsi_boot_volume["mx2d-128x1024"] + ├─ Instance Hours (mx2d-128x1024) 730 Hours $6,464.88 + └─ Boot volume (boot-volume-label, 250 GB) 182,500 Hours $20.98 + + ibm_is_instance.vsi_boot_volume["mx3d-128x1280"] + ├─ Instance Hours (mx3d-128x1280) 730 Hours $6,659.06 + └─ Boot volume (boot-volume-label, 250 GB) 182,500 Hours $20.98 + + ibm_is_instance.vsi_boot_volume["ox2-128x1024"] + ├─ Instance Hours (ox2-128x1024) 730 Hours $8,070.15 + └─ Boot volume (boot-volume-label, 250 GB) 182,500 Hours $20.98 + + ibm_is_instance.vsi_boot_volume["ux2d-100x2800"] + ├─ Instance Hours (ux2d-100x2800) 730 Hours $14,656.94 + └─ Boot volume (boot-volume-label, 250 GB) 182,500 Hours $20.98 + + ibm_is_instance.vsi_boot_volume["vx2d-144x2016"] + ├─ Instance Hours (vx2d-144x2016) 730 Hours $11,359.53 + └─ Boot volume (boot-volume-label, 250 GB) 182,500 Hours $20.98 + + ibm_is_instance.vsi_dedicated_host["bx2-128x512"] + ├─ Instance Hours (bx2-128x512) 730 Hours $4,688.06 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi_dedicated_host["bx2a-128x512"] + ├─ Instance Hours (bx2a-128x512) 730 Hours $4,688.06 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi_dedicated_host["bx2d-128x512"] + ├─ Instance Hours (bx2d-128x512) 730 Hours $5,089.56 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi_dedicated_host["bx3d-128x640"] + ├─ Instance Hours (bx3d-128x640) 730 Hours $5,242.13 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi_dedicated_host["bx3dc-16x80"] + ├─ Instance Hours (bx3dc-16x80) 730 Hours $655.54 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi_dedicated_host["cx2-128x256"] + ├─ Instance Hours (cx2-128x256) 730 Hours $4,150.78 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi_dedicated_host["cx2-2x4"] + ├─ Instance Hours (cx2-2x4) 730 Hours $64.97 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi_dedicated_host["cx2d-128x256"] + ├─ Instance Hours (cx2d-128x256) 730 Hours $4,552.28 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi_dedicated_host["cx3d-128x320"] + ├─ Instance Hours (cx3d-128x320) 730 Hours $4,688.79 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi_dedicated_host["cx3dc-128x320"] + ├─ Instance Hours (cx3dc-128x320) 730 Hours $4,688.79 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi_dedicated_host["gx2-16x128x1v100"] + ├─ Instance Hours (gx2-16x128x1v100) 730 Hours $2,283.44 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi_dedicated_host["gx3-16x80x1l4"] + ├─ Instance Hours (gx3-16x80x1l4) 730 Hours $1,124.20 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi_dedicated_host["gx3d-160x1792x8h100"] + ├─ Instance Hours (gx3d-160x1792x8h100) 730 Hours $69,350.00 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi_dedicated_host["mx2-128x1024"] + ├─ Instance Hours (mx2-128x1024) 730 Hours $6,063.38 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi_dedicated_host["mx2-8x64"] + ├─ Instance Hours (mx2-8x64) 730 Hours $378.87 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi_dedicated_host["mx2d-128x1024"] + ├─ Instance Hours (mx2d-128x1024) 730 Hours $6,464.88 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi_dedicated_host["mx3d-128x1280"] + ├─ Instance Hours (mx3d-128x1280) 730 Hours $6,659.06 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi_dedicated_host["ox2-128x1024"] + ├─ Instance Hours (ox2-128x1024) 730 Hours $8,070.15 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi_dedicated_host["ux2d-100x2800"] + ├─ Instance Hours (ux2d-100x2800) 730 Hours $14,656.94 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_instance.vsi_dedicated_host["vx2d-144x2016"] + ├─ Instance Hours (vx2d-144x2016) 730 Hours $11,359.53 + └─ Boot volume (Unnamed boot volume, 100 GB) 73,000 Hours $8.39 + + ibm_is_vpc.vpc + ├─ VPC instance 1 Instance $0.00 + ├─ VPC egress free allowance (first 5GB) Monthly cost depends on usage: $0.00 per GB + └─ VPC egress us-south (first 9995 GB) Monthly cost depends on usage: $0.090915 per GB + └─ VPC egress us-south (next 40000 GB) Monthly cost depends on usage: $0.086735 per GB + └─ VPC egress us-south (next 100000 GB) Monthly cost depends on usage: $0.07315 per GB + └─ VPC egress us-south (over 149995 GB) Monthly cost depends on usage: $0.05225 per GB + + OVERALL TOTAL $495,513.45 ────────────────────────────────── -9 cloud resources were detected: -∙ 4 were estimated, all of which include usage-based costs, see https://infracost.io/usage-file +66 cloud resources were detected: +∙ 61 were estimated, all of which include usage-based costs, see https://infracost.io/usage-file ∙ 3 were free: ∙ 1 x ibm_is_ssh_key ∙ 1 x ibm_is_subnet diff --git a/internal/providers/terraform/ibm/testdata/is_instance_test/is_instance_test.tf b/internal/providers/terraform/ibm/testdata/is_instance_test/is_instance_test.tf index 305302a2f75..d2597c5e296 100644 --- a/internal/providers/terraform/ibm/testdata/is_instance_test/is_instance_test.tf +++ b/internal/providers/terraform/ibm/testdata/is_instance_test/is_instance_test.tf @@ -48,10 +48,8 @@ resource "ibm_is_ssh_key" "ssh_key" { resource "ibm_is_instance" "vsi" { for_each = toset(local.profiles) name = "vsi-instance-${random_string.unique_identifier.result}-${each.key}" - # name = "vsi-instance-${random_string.unique_identifier.result}" image = "r006-f137ea64-0d27-4d81-afe0-353fd0557e81" keys = [ibm_is_ssh_key.ssh_key.id] - # profile = "cx2-2x4" profile = each.key resource_group = ibm_resource_group.resource_group.id vpc = ibm_is_vpc.vpc.id @@ -68,10 +66,8 @@ resource "ibm_is_instance" "vsi" { resource "ibm_is_instance" "vsi_boot_volume" { for_each = toset(local.profiles) name = "vsi-instance-boot-volume-${random_string.unique_identifier.result}-${each.key}" - # name = "vsi-instance-boot-volume-${random_string.unique_identifier.result}" image = "r006-f137ea64-0d27-4d81-afe0-353fd0557e81" keys = [ibm_is_ssh_key.ssh_key.id] - # profile = "cx2-2x4" profile = each.key resource_group = ibm_resource_group.resource_group.id vpc = ibm_is_vpc.vpc.id @@ -92,10 +88,8 @@ resource "ibm_is_instance" "vsi_boot_volume" { resource "ibm_is_instance" "vsi_dedicated_host" { for_each = toset(local.profiles) name = "vsi-instance-dedicated-host-${random_string.unique_identifier.result}-${each.key}" - # name = "vsi-instance-dedicated-host-${random_string.unique_identifier.result}" image = "r006-f137ea64-0d27-4d81-afe0-353fd0557e81" keys = [ibm_is_ssh_key.ssh_key.id] - # profile = "cx2-2x4" profile = each.key resource_group = ibm_resource_group.resource_group.id vpc = ibm_is_vpc.vpc.id @@ -127,155 +121,174 @@ resource "ibm_is_dedicated_host_group" "dedicated_host_group" { locals { profiles = [ - "cx2-2x4", - "cx2d-2x4", - "cx3d-2x5", - "cx3dc-2x5", - "bx2-2x8", - "bx2a-2x8", - "bx2d-2x8", - "bx3d-2x10", - "bx3dc-2x10", - "mx2-2x16", - "mx2d-2x16", - "ox2-2x16", - "mx3d-2x20", - "vx2d-2x28", - "ux2d-2x56", - "cx2-4x8", - "cx2d-4x8", - "cx3d-4x10", - "cx3dc-4x10", - "bx2-4x16", - "bx2a-4x16", - "bx2d-4x16", - "bx3d-4x20", - "bx3dc-4x20", - "mx2-4x32", - "mx2d-4x32", - "ox2-4x32", - "mx3d-4x40", - "vx2d-4x56", - "ux2d-4x112", - "cx2-8x16", - "cx2d-8x16", - "cx3d-8x20", - "cx3dc-8x20", - "bx2-8x32", - "bx2a-8x32", - "bx2d-8x32", - "bx3d-8x40", - "bx3dc-8x40", - "mx2-8x64", - "mx2d-8x64", - "ox2-8x64", - "gx2-8x64x1v100", - "mx3d-8x80", - "vx2d-8x112", - "ux2d-8x224", - "cx2-16x32", - "cx2d-16x32", - "cx3d-16x40", - "cx3dc-16x40", - "bx2-16x64", - "bx2a-16x64", - "bx2d-16x64", - "bx3d-16x80", - "gx3-16x80x1l4", + + "bx2-128x512", + # "bx2-16x64", + # "bx2-2x8", + # "bx2-32x128", + # "bx2-48x192", + # "bx2-4x16", + # "bx2-64x256", + # "bx2-8x32", + # "bx2-96x384", + + "bx2a-128x512", + # "bx2a-16x64", + # "bx2a-228x912", + # "bx2a-2x8", + # "bx2a-32x128", + # "bx2a-48x192", + # "bx2a-4x16", + # "bx2a-8x32", + # "bx2a-96x384", + + "bx2d-128x512", + # "bx2d-16x64", + # "bx2d-2x8", + # "bx2d-32x128", + # "bx2d-48x192", + # "bx2d-4x16", + # "bx2d-64x256", + # "bx2d-8x32", + # "bx2d-96x384", + + "bx3d-128x640", + # "bx3d-16x80", + # "bx3d-176x880", + # "bx3d-24x120", + # "bx3d-2x10", + # "bx3d-32x160", + # "bx3d-48x240", + # "bx3d-4x20", + # "bx3d-64x320", + # "bx3d-8x40", + # "bx3d-96x480", + "bx3dc-16x80", - "mx2-16x128", - "mx2d-16x128", - "ox2-16x128", - "gx2-16x128x1v100", - "gx2-16x128x2v100", - "mx3d-16x160", - "vx2d-16x224", - "ux2d-16x448", - "cx3d-24x60", - "cx3dc-24x60", - "bx3d-24x120", - "bx3dc-24x120", - "gx3-24x120x1l40s", - "mx3d-24x240", - "cx2-32x64", - "cx2d-32x64", - "cx3d-32x80", - "cx3dc-32x80", - "bx2-32x128", - "bx2a-32x128", - "bx2d-32x128", - "bx3d-32x160", - "gx3-32x160x2l4", - "bx3dc-32x160", - "mx2-32x256", - "mx2d-32x256", - "ox2-32x256", - "gx2-32x256x2v100", - "mx3d-32x320", - "ux2d-36x1008", - "vx2d-44x616", - "cx2-48x96", - "cx2d-48x96", - "cx3d-48x120", - "cx3dc-48x120", - "bx2-48x192", - "bx2a-48x192", - "bx2d-48x192", - "bx3d-48x240", - "bx3dc-48x240", - "gx3-48x240x2l40s", - "mx2-48x384", - "mx2d-48x384", - "mx3d-48x480", - "ux2d-48x1344", - "cx2-64x128", - "cx2d-64x128", - "cx3d-64x160", - "cx3dc-64x160", - "bx2-64x256", - "bx2d-64x256", - "bx3d-64x320", - "gx3-64x320x4l4", - "bx3dc-64x320", - "mx2-64x512", - "mx2d-64x512", - "ox2-64x512", - "mx3d-64x640", - "ux2d-72x2016", - "vx2d-88x1232", - "cx2-96x192", - "cx2d-96x192", - "cx3d-96x240", - "cx3dc-96x240", - "bx2-96x384", - "bx2a-96x384", - "bx2d-96x384", - "bx3d-96x480", - "bx3dc-96x480", - "mx2-96x768", - "mx2d-96x768", - "ox2-96x768", - "mx3d-96x960", - "ux2d-100x2800", + # "bx3dc-24x120", + # "bx3dc-2x10", + # "bx3dc-32x160", + # "bx3dc-48x240", + # "bx3dc-4x20", + # "bx3dc-64x320", + # "bx3dc-8x40", + # "bx3dc-96x480", + "cx2-128x256", + # "cx2-16x32", + "cx2-2x4", + # "cx2-32x64", + # "cx2-48x96", + # "cx2-4x8", + # "cx2-64x128", + # "cx2-8x16", + # "cx2-96x192", + "cx2d-128x256", + # "cx2d-16x32", + # "cx2d-2x4", + # "cx2d-32x64", + # "cx2d-48x96", + # "cx2d-4x8", + # "cx2d-64x128", + # "cx2d-8x16", + # "cx2d-96x192", + "cx3d-128x320", + # "cx3d-16x40", + # "cx3d-176x440", + # "cx3d-24x60", + # "cx3d-2x5", + # "cx3d-32x80", + # "cx3d-48x120", + # "cx3d-4x10", + # "cx3d-64x160", + # "cx3d-8x20", + # "cx3d-96x240", + "cx3dc-128x320", - "bx2-128x512", - "bx2a-128x512", - "bx2d-128x512", - "bx3d-128x640", + # "cx3dc-16x40", + # "cx3dc-24x60", + # "cx3dc-2x5", + # "cx3dc-32x80", + # "cx3dc-48x120", + # "cx3dc-4x10", + # "cx3dc-64x160", + # "cx3dc-8x20", + # "cx3dc-96x240", + + "gx2-16x128x1v100", + # "gx2-16x128x2v100", + # "gx2-32x256x2v100", + # "gx2-8x64x1v100", + + "gx3-16x80x1l4", + # "gx3-24x120x1l40s", + # "gx3-32x160x2l4", + # "gx3-48x240x2l40s", + # "gx3-64x320x4l4", + + "gx3d-160x1792x8h100", + "mx2-128x1024", + # "mx2-16x128", + # "mx2-2x16", + # "mx2-32x256", + # "mx2-48x384", + # "mx2-4x32", + # "mx2-64x512", + "mx2-8x64", + # "mx2-96x768", + "mx2d-128x1024", - "ox2-128x1024", + # "mx2d-16x128", + # "mx2d-2x16", + # "mx2d-32x256", + # "mx2d-48x384", + # "mx2d-4x32", + # "mx2d-64x512", + # "mx2d-8x64", + # "mx2d-96x768", + "mx3d-128x1280", + # "mx3d-16x160", + # "mx3d-176x1760", + # "mx3d-24x240", + # "mx3d-2x20", + # "mx3d-32x320", + # "mx3d-48x480", + # "mx3d-4x40", + # "mx3d-64x640", + # "mx3d-8x80", + # "mx3d-96x960", + + "ox2-128x1024", + # "ox2-16x128", + # "ox2-2x16", + # "ox2-32x256", + # "ox2-4x32", + # "ox2-64x512", + # "ox2-8x64", + # "ox2-96x768", + + "ux2d-100x2800", + # "ux2d-16x448", + # "ux2d-200x5600", + # "ux2d-2x56", + # "ux2d-36x1008", + # "ux2d-48x1344", + # "ux2d-4x112", + # "ux2d-72x2016", + # "ux2d-8x224", + "vx2d-144x2016", - "gx3d-160x1792x8h100", - "cx3d-176x440", - "bx3d-176x880", - "mx3d-176x1760", - "vx2d-176x2464", - "ux2d-200x5600", - "bx2a-228x912" + # "vx2d-16x224", + # "vx2d-176x2464", + # "vx2d-2x28", + # "vx2d-4x56", + # "vx2d-88x1232", + # "vx2d-8x112", + + # "vx2d-44x616", ] } diff --git a/internal/resources/ibm/is_instance.go b/internal/resources/ibm/is_instance.go index d73490b61bd..b05238a53ea 100644 --- a/internal/resources/ibm/is_instance.go +++ b/internal/resources/ibm/is_instance.go @@ -2,6 +2,7 @@ package ibm import ( "fmt" + "regexp" "github.com/infracost/infracost/internal/resources" "github.com/infracost/infracost/internal/schema" @@ -37,10 +38,21 @@ func (r *IsInstance) PopulateUsage(u *schema.UsageData) { func (r *IsInstance) instanceHoursCostComponent() *schema.CostComponent { + service := "is.reservation" + planNamePrefix := "instance-" unit := "RESERVATION_HOURS_HOURLY" - planName := fmt.Sprintf("instance-%s", r.Profile) + + isConfidentialProfile, _ := regexp.MatchString("^.*c-.*$", r.Profile) + if isConfidentialProfile { + service = "is.instance" + planNamePrefix = "" + unit = "INSTANCE_HOURS_MULTI_TENANT" + } + + planName := fmt.Sprintf("%s%s", planNamePrefix, r.Profile) unitMultiplier := int64(1) var q *decimal.Decimal + if r.MonthlyInstanceHours != nil { q = decimalPtr(decimal.NewFromFloat(*r.MonthlyInstanceHours)) } @@ -57,7 +69,7 @@ func (r *IsInstance) instanceHoursCostComponent() *schema.CostComponent { ProductFilter: &schema.ProductFilter{ VendorName: strPtr("ibm"), Region: strPtr(r.Region), - Service: strPtr("is.reservation"), + Service: strPtr(service), ProductFamily: strPtr("service"), AttributeFilters: []*schema.AttributeFilter{ {Key: "planName", Value: &planName},