Should create a VPC with 3 subnets.
Should create a cluster with 3 worker nodes. Each worker nodes is in each availability zones.
Actual Behavior
Created a VPC with 3 subnets (OK).
Failed to create TKE cluster
Error: [TencentCloudSDKError] Code=InternalError.Param, Message=subnetId subnet-fqsrws7w must be empty,but used to create Instances, RequestId=e3baf034-abf8-4a05-a17f-1b6fb69df53b
│
│ with tencentcloud_kubernetes_cluster.managed_cluster,
│ on main.tf line 83, in resource "tencentcloud_kubernetes_cluster" "managed_cluster":
│ 83: resource "tencentcloud_kubernetes_cluster" "managed_cluster" {
│
As the VPC-CNI Mode Documentation , Subnets in VPC-CNI mode cannot be used by other cloud resources, such as CVMs and CLBs.
There is two way to solve this problem:
Avoid specifying workers and cluster under the same subnet
Terraform Version
$ terraform -version Terraform v0.15.4 on darwin_amd64
Affected Resource(s)
Terraform Configuration Files
Debug Output
https://gist.github.com/quangthe/3df4e71f96df632e564a285935987df5
Panic Output
No
Expected Behavior
Should create a VPC with 3 subnets. Should create a cluster with 3 worker nodes. Each worker nodes is in each availability zones.
Actual Behavior
Created a VPC with 3 subnets (OK). Failed to create TKE cluster
Steps to Reproduce
terraform apply
Important Factoids
No
References