Changing size of Kubernikus cluster causes error
UncleIS opened this issue · 0 comments
UncleIS commented
Hi!
When I try to resize a pool inside of a Kubernikus cluster (change the number of instances), an error message is emitted.
Terraform Version
Terraform v0.11.8
- provider.ccloud (unversioned)
- provider.openstack (unversioned)
Affected Resource(s)
- ccloud_kubernetes
Terraform Configuration Files
02_varibales.tf
# Define variables to be used in resource definitions
variable "name_prefix" {}
variable "private_subnet_cidr" {}
variable "private_subnet_ipv" {}
variable "k8s_pool1_name" {}
variable "k8s_pool1_flavor" {}
variable "k8s_pool1_size" {}
variable "sg_default_name" {}
23_main_k8s.tf
# k8s
resource "ccloud_kubernetes" "k8s" {
name = "${var.name_prefix}"
ssh_public_key = "<some_key>"
node_pools = [
{
name = "${var.k8s_pool1_name}"
flavor = "${var.k8s_pool1_flavor}"
size = "${var.k8s_pool1_size}"
},
]
depends_on = [
"openstack_networking_router_v2.kuberouter",
"openstack_networking_router_interface_v2.kuberouter_interface",
]
}
conf/qa.tfvars
name_prefix = "uxp-qa"
private_subnet_cidr = "10.180.0.0/24"
private_subnet_ipv = 4
k8s_pool1_name = "pool1"
k8s_pool1_flavor = "m1.4xlarge"
k8s_pool1_size = 3
sg_default_name = "default"
Debug Output
https://gist.github.com/UncleIS/615649bca972be5cf99f7e9bff8743e2
Expected Behavior
The number of instances in the pool should have been updated.
Actual Behavior
An error was thrown:
Terraform will perform the following actions:
~ ccloud_kubernetes.k8s
node_pools.0.size: "4" => "3"
Plan: 0 to add, 1 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
ccloud_kubernetes.k8s: Modifying... (ID: uxp-qa)
node_pools.0.size: "4" => "3"
Error: Error applying plan:
1 error(s) occurred:
* ccloud_kubernetes.k8s: 1 error(s) occurred:
* ccloud_kubernetes.k8s: Error updating cluster: method PUT is not allowed, but [POST,GET] are
Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
- Update the amount of instances that form a Kubenikus cluster pool
- Run 'terraform apply'
Important Factoids
Running in SAP Converged Cloud offering