Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove references for creating free clusters, no longer supported #4987

Merged
merged 2 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/ibm-cd-toolchain-simple-helm/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ variable "app_image_name" {
variable "cluster_name" {
type = string
description = "Name of the kubernetes cluster where the application will be deployed."
default = "mycluster-free"
default = "mycluster"
}

variable "cluster_namespace" {
Expand Down
2 changes: 1 addition & 1 deletion examples/ibm-cluster-update/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ variable "service_offering" {
}

variable "plan" {
default = "lite"
default = "standard"
}

variable "cluster_name" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ variable "service_offering" {
}

variable "plan" {
default = "lite"
default = "standard"
}

variable "cluster_name" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ func dataSourceIBMContainerClusterRead(d *schema.ResourceData, meta interface{})
}

albs, err := albsAPI.ListClusterALBs(name, targetEnv)
if err != nil && !strings.Contains(err.Error(), "The specified cluster is a lite cluster.") && !strings.Contains(err.Error(), "This operation is not supported for your cluster's version.") && !strings.Contains(err.Error(), "The specified cluster is a free cluster.") {
mattshaw92 marked this conversation as resolved.
Show resolved Hide resolved
if err != nil && !strings.Contains(err.Error(), "This operation is not supported for your cluster's version.") {
return fmt.Errorf("[ERROR] Error retrieving alb's of the cluster %s: %s", name, err)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ func dataSourceIBMContainerClusterVPCRead(d *schema.ResourceData, meta interface

if !strings.HasSuffix(cls.MasterKubeVersion, _OPENSHIFT) {
albs, err := csClient.Albs().ListClusterAlbs(clusterID, targetEnv)
if err != nil && !strings.Contains(err.Error(), "The specified cluster is a lite cluster.") {
if err != nil {
return fmt.Errorf("[ERROR] Error retrieving alb's of the cluster %s: %s", clusterID, err)
}

Expand Down
12 changes: 5 additions & 7 deletions ibm/service/kubernetes/resource_ibm_container_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -828,12 +828,10 @@ func resourceIBMContainerClusterRead(d *schema.ResourceData, meta interface{}) e
d.Set("private_vlan_id", workersByPool[0].PrivateVlan)
}
d.Set("machine_type", strings.Split(workersByPool[0].MachineType, ".encrypted")[0])
if workersByPool[0].MachineType != "free" {
if strings.HasSuffix(workersByPool[0].MachineType, ".encrypted") {
d.Set("disk_encryption", true)
} else {
d.Set("disk_encryption", false)
}
if strings.HasSuffix(workersByPool[0].MachineType, ".encrypted") {
d.Set("disk_encryption", true)
} else {
d.Set("disk_encryption", false)
}

if len(workersByPool) > 0 {
Expand Down Expand Up @@ -866,7 +864,7 @@ func resourceIBMContainerClusterRead(d *schema.ResourceData, meta interface{}) e
}

albs, err := albsAPI.ListClusterALBs(clusterID, targetEnv)
if err != nil && !strings.Contains(err.Error(), "The specified cluster is a lite cluster.") && !strings.Contains(err.Error(), "This operation is not supported for your cluster's version.") && !strings.Contains(err.Error(), "The specified cluster is a free cluster.") {
if err != nil && !strings.Contains(err.Error(), "This operation is not supported for your cluster's version.") {

return fmt.Errorf("[ERROR] Error retrieving alb's of the cluster %s: %s", clusterID, err)
}
Expand Down
8 changes: 4 additions & 4 deletions website/docs/r/container_cluster.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The following example creates a single zone IBM Cloud Kubernetes Service cluster
resource "ibm_container_cluster" "testacc_cluster" {
name = "test"
datacenter = "dal10"
machine_type = "free"
machine_type = "u2c.2x4"
hardware = "shared"
public_vlan_id = "vlan"
private_vlan_id = "vlan"
Expand All @@ -53,7 +53,7 @@ resource "ibm_container_cluster" "testacc_cluster" {
resource "ibm_container_cluster" "testacc_cluster" {
name = "test"
datacenter = "dal10"
machine_type = "free"
machine_type = "u2c.2x4"
hardware = "shared"
public_vlan_id = "vlan"
private_vlan_id = "vlan"
Expand Down Expand Up @@ -219,9 +219,9 @@ Review the argument references that you can specify for your resource.
- `operating_system` - (Optional, String) The operating system of the workers in the default worker pool. For supported options, see [Red Hat OpenShift on IBM Cloud version information](https://cloud.ibm.com/docs/openshift?topic=openshift-openshift_versions) or [IBM Cloud Kubernetes Service version information](https://cloud.ibm.com/docs/containers?topic=containers-cs_versions). This field only affects cluster creation, to manage the default worker pool, create a dedicated worker pool resource.
- `patch_version` - (Optional, String) Updates the worker nodes with the required patch version. The patch_version should be in the format: `patch_version_fixpack_version`. For more information, about Kubernetes version information and update, see [Kubernetes version update](https://cloud.ibm.com/docs/containers?topic=containers-cs_versions). **NOTE:** To update the patch or fix pack versions of the worker nodes, run the command `ibmcloud ks workers -c <cluster_name_or_id> output json`. Fetch the required patch & fix pack versions from `kubeVersion.target` and set the `patch_version` parameter.
- `public_service_endpoint` - (Optional, Forces new resource, Bool) If set to **true**, your cluster is set up with a public service endpoint. You can use the public service endpoint to access the Kubernetes master from the public network. To use service endpoints, your account must be enabled for [Virtual Routing and Forwarding (VRF)](https://cloud.ibm.com/docs/account?topic=account-vrf-service-endpoint#vrf). For more information, see [Worker-to-master and user-to-master communication: Service endpoints](https://cloud.ibm.com/docs/containers?topic=containers-plan_clusters#workeruser-master). If set to **false**, the public service endpoint is disabled for your cluster.
- `public_vlan_id` - (Optional, String) The ID of the public VLAN that you want to use for the worker nodes in the default worker pool. You can retrieve the VLAN ID with the `ibmcloud ks vlans --zone <zone>` command. </br></br> * **Free clusters**: If you want to provision a free cluster, you do not need to enter a public VLAN ID. Your cluster is automatically connected to a public VLAN that is owned by IBM. </br> * **Standard clusters**: If you create a standard cluster and you have an existing public VLAN ID for the zone where you plan to set up worker nodes, you must enter the VLAN ID. To retrieve the ID, run `ibmcloud ks vlans --zone <zone>`. If you do not have an existing public VLAN ID, or you want to connect your cluster to a private VLAN only, do not specify this option. **Note**: The prerequisite for using service endpoints, account must be enabled for [Virtual Routing and Forwarding (VRF)](https://cloud.ibm.com/docs/infrastructure/direct-link/vrf-on-ibm-cloud.html#overview-of-virtual-routing-and-forwarding-vrf-on-ibm-cloud). Account must be enabled for connectivity to service endpoints. Use the resource `ibm_container_cluster_feature` to update the `public_service_endpoint` and `private_service_endpoint`. This field only affects cluster creation, to manage the default worker pool, create a dedicated worker pool resource.
- `public_vlan_id` - (Optional, String) The ID of the public VLAN that you want to use for the worker nodes in the default worker pool. You can retrieve the VLAN ID with the `ibmcloud ks vlans --zone <zone>` command. </br></br> * **Free clusters**: If you create a standard cluster and you have an existing public VLAN ID for the zone where you plan to set up worker nodes, you must enter the VLAN ID. To retrieve the ID, run `ibmcloud ks vlans --zone <zone>`. If you do not have an existing public VLAN ID, or you want to connect your cluster to a private VLAN only, do not specify this option. **Note**: The prerequisite for using service endpoints, account must be enabled for [Virtual Routing and Forwarding (VRF)](https://cloud.ibm.com/docs/infrastructure/direct-link/vrf-on-ibm-cloud.html#overview-of-virtual-routing-and-forwarding-vrf-on-ibm-cloud). Account must be enabled for connectivity to service endpoints. Use the resource `ibm_container_cluster_feature` to update the `public_service_endpoint` and `private_service_endpoint`. This field only affects cluster creation, to manage the default worker pool, create a dedicated worker pool resource.
- `private_service_endpoint` - (Optional, Forces new resource, Bool) If set to **true**, your cluster is set up with a private service endpoint. When the private service endpoint is enabled, communication between the Kubernetes and the worker nodes is established over the private network. If you enable the private service endpoint, you cannot disable it later. To use service endpoints, your account must be enabled for [Virtual Routing and Forwarding (VRF)](https://cloud.ibm.com/docs/account?topic=account-vrf-service-endpoint#vrf). For more information, see [Worker-to-master and user-to-master communication: Service endpoints](https://cloud.ibm.com/docs/containers?topic=containers-plan_clusters#workeruser-master). If set to **false**, the private service endpoint is disabled and all communication to the Kubernetes master must go through the public network.
- `private_vlan_id` - (Optional, String) The ID of the private VLAN that you want to use for the worker nodes in your default worker pool. You can retrieve the VLAN ID with the `ibmcloud ks vlans --zone <zone>` command. </br></br> * **Free clusters**: If you want to provision a free cluster, you do not need to enter a private VLAN ID. Your cluster is automatically connected to a private VLAN that is owned by IBM. </br> * **Standard clusters**: If you create a standard cluster and you have an existing private VLAN ID for the zone where you plan to set up worker nodes, you must enter the VLAN ID. To retrieve the ID, run `ibmcloud ks vlans --zone <zone>`. If you do not have an existing private VLAN ID, do not specify this option. A private VLAN is created automatically for you. This field only affects cluster creation, to manage the default worker pool, create a dedicated worker pool resource.
- `private_vlan_id` - (Optional, String) The ID of the private VLAN that you want to use for the worker nodes in your default worker pool. You can retrieve the VLAN ID with the `ibmcloud ks vlans --zone <zone>` command. </br></br> * * **Standard clusters**: If you create a standard cluster and you have an existing private VLAN ID for the zone where you plan to set up worker nodes, you must enter the VLAN ID. To retrieve the ID, run `ibmcloud ks vlans --zone <zone>`. If you do not have an existing private VLAN ID, do not specify this option. A private VLAN is created automatically for you. This field only affects cluster creation, to manage the default worker pool, create a dedicated worker pool resource.
- `pod_subnet`- (Optional, String) Specify a custom subnet CIDR to provide private IP addresses for pods. The subnet must be at least `/23` or more. For more information, refer to [Pod subnet](https://cloud.ibm.com/docs/containers?topic=containers-cli-plugin-kubernetes-service-cli#pod-subnet).Yes-
- `resource_group_id` - (Optional, String) The ID of the resource group where you want to provision your cluster. To retrieve the ID, use the `ibm_resource_group` data source. If no value is provided, the cluster is automatically provisioned into the `default` resource group.
- `retry_patch_version` - (Optional, Integer) This argument retries the update of `patch_version` if the previous update fails. Increment the value to retry the update of `patch_version` on worker nodes.
Expand Down
1 change: 0 additions & 1 deletion website/docs/r/container_vpc_cluster.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ description: |-

# ibm_container_vpc_cluster
Create, update, or delete a VPC cluster. To create a VPC cluster, make sure to include the VPC infrastructure generation in the `provider` block of your Terraform configuration file. If you do not set this value, the generation is automatically set to 2. For more information, about how to configure the `provider` block, see [Overview of required input parameters for each resource category](https://cloud.ibm.com/docs/ibm-cloud-provider-for-terraform?topic=ibm-cloud-provider-for-terraform-provider-reference#required-parameters).
You cannot create a free cluster in IBM Cloud Schematics.

If you want to delete a VPC cluster and their associated load balancer. The following order is followed by the resource.
1. Invokes the cluster deletion.
Expand Down
Loading