Skip to content

Commit

Permalink
Merge branch 'master' into chore/update-crypto-deps
Browse files Browse the repository at this point in the history
  • Loading branch information
hiltol authored Jan 2, 2025
2 parents 168c8e1 + 78489b1 commit 43b0cd5
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,17 @@
├─ VPC Container Work Zone flavor: (bx2.4x16) region: (eu-de) name: (eu-de-1) x(3) workers 2,190 hours $1,039.78
└─ VPC Container Work Zone flavor: (bx2.4x16) region: (eu-de) name: (eu-de-2) x(3) workers 2,190 hours $1,039.78

OVERALL TOTAL $8,226.30
roks-no-entitlement
├─ VPC Container Work Zone flavor: (bx2.4x16) region: (eu-de) name: (eu-de-1) x(3) workers 3 hours $1.42
└─ VPC Container Work Zone flavor: (bx2.4x16) region: (eu-de) name: (eu-de-2) x(3) workers 3 hours $1.42

roks-with-entitlement
├─ VPC Container Work Zone flavor: (bx2.4x16) region: (eu-de) name: (eu-de-1) x(3) workers 3 hours $0.91
└─ VPC Container Work Zone flavor: (bx2.4x16) region: (eu-de) name: (eu-de-2) x(3) workers 3 hours $0.91

OVERALL TOTAL $8,230.97
──────────────────────────────────
6 cloud resources were detected:
4 were estimated, 1 of which usage-based costs, see https://infracost.io/usage-file
8 cloud resources were detected:
6 were estimated, 1 of which usage-based costs, see https://infracost.io/usage-file
∙ 2 were free:
∙ 2 x ibm_is_subnet
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,36 @@ resource "ibm_container_vpc_cluster" "roks_cluster_with_usage" {
name = "eu-de-2"
}
}

resource "ibm_container_vpc_cluster" "roks_with_entitlement" {
name = "roks-with-entitlement"
vpc_id = ibm_is_vpc.vpc1.id
flavor = "bx2.4x16"
worker_count = 3
kube_version = "4.13_openshift"
entitlement = "cloud_pak"
zones {
subnet_id = ibm_is_subnet.subnet1.id
name = "eu-de-1"
}
zones {
subnet_id = ibm_is_subnet.subnet1.id
name = "eu-de-2"
}
}

resource "ibm_container_vpc_cluster" "roks_no_entitlement" {
name = "roks-no-entitlement"
vpc_id = ibm_is_vpc.vpc1.id
flavor = "bx2.4x16"
worker_count = 3
kube_version = "4.13_openshift"
zones {
subnet_id = ibm_is_subnet.subnet1.id
name = "eu-de-1"
}
zones {
subnet_id = ibm_is_subnet.subnet1.id
name = "eu-de-2"
}
}
4 changes: 4 additions & 0 deletions internal/resources/ibm/container_vpc_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ func (r *ContainerVpcCluster) BuildResource() *schema.Resource {
attributeFilters = append(attributeFilters, &schema.AttributeFilter{
Key: "ocpIncluded", Value: strPtr("true"),
})
} else {
attributeFilters = append(attributeFilters, &schema.AttributeFilter{
Key: "ocpIncluded", Value: strPtr("false"),
})
}
WorkerCount := decimalPtr(decimal.NewFromInt(1))
if r.WorkerCount != 0 {
Expand Down
4 changes: 4 additions & 0 deletions internal/resources/ibm/container_vpc_worker_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ func (r *ContainerVpcWorkerPool) BuildResource() *schema.Resource {
attributeFilters = append(attributeFilters, &schema.AttributeFilter{
Key: "ocpIncluded", Value: strPtr("true"),
})
} else {
attributeFilters = append(attributeFilters, &schema.AttributeFilter{
Key: "ocpIncluded", Value: strPtr("false"),
})
}
WorkerCount := decimalPtr(decimal.NewFromInt(1))
if r.WorkerCount != 0 {
Expand Down

0 comments on commit 43b0cd5

Please sign in to comment.